/* =============================================
   STYLES.CSS — Jakub Groblicki Personal Site
   Mobile-first responsive stylesheet
   ============================================= */

/* ── 1. CSS CUSTOM PROPERTIES ── */
:root {
  --bg-main:        #f2ede6;
  --bg-off:         #ebe4db;
  --bg-card:        #e8e0d5;
  --bg-dark:        #1c1914;
  --text-primary:   #1c1914;
  --text-secondary: #7a7168;
  --text-light:     #f2ede6;
  --accent:         #8c6a3f;
  --accent-light:   rgba(140, 106, 63, 0.12);
  --border:         rgba(140, 106, 63, 0.25);
  --border-subtle:  rgba(28, 25, 20, 0.1);
  --font-display:   'Cormorant Garamond', 'Garamond', Georgia, serif;
  --font-body:      'Gill Sans', 'Gill Sans MT', Calibri, sans-serif;
  --font-mono:      'Courier New', monospace;
  --transition:     0.3s ease;
  --radius:         2px;
}


/* ── 2. RESET & BASE ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Paper grain texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

::selection { background: var(--accent); color: var(--text-light); }

img     { max-width: 100%; display: block; }
address { font-style: normal; }
hr      { border: none; border-top: 1px solid var(--border-subtle); }

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--transition);
}
a:hover { opacity: 0.65; }
a:focus { outline: 2px solid var(--accent); outline-offset: 3px; }


/* ── 3. TYPOGRAPHY ── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.03em;
}

h1 { font-size: 42px; }
h2 { font-size: 28px; letter-spacing: 0.06em; text-transform: uppercase; }
h3 { font-size: 20px; font-weight: 400; }

p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.95;
  letter-spacing: 0.02em;
}


/* ── 4. LAYOUT ── */
.container { padding: 64px 5%; }

.section-label {
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-label::after {
  content: '';
  display: block;
  width: 48px;
  height: 1px;
  background: var(--accent);
}


/* ── 5. HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px 5% 60px;
  position: relative;
  overflow: hidden;
  gap: 48px;
}

.hero-text { position: relative; z-index: 1; }

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 36px;
  height: 1px;
  background: var(--accent);
}

.hero h1    { margin-bottom: 20px; }
.hero h1 em { font-style: italic; color: var(--accent); }

.hero-subtitle {
  font-family: var(--font-display);
  font-size: 17px;
  font-style: italic;
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 420px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.cta-button {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-light);
  background: var(--bg-dark);
  padding: 14px 32px;
  display: inline-block;
  transition: background var(--transition);
}
.cta-button:hover { background: var(--accent); opacity: 1; }

.cta-secondary {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color var(--transition), border-color var(--transition);
}
.cta-secondary:hover { color: var(--accent); border-color: var(--accent); opacity: 1; }

.hero-image-col { position: relative; z-index: 1; }

.profile-photo {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  filter: sepia(15%) contrast(1.05);
  border: 1px solid var(--border);
}

.photo-caption {
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.hero-scroll {
  font-size: 9px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}
.hero-scroll::before {
  content: '';
  display: block;
  width: 1px;
  height: 48px;
  background: var(--border);
}


/* ── 6. ABOUT ── */
#section-about { border-top: 1px solid var(--border-subtle); }

.about-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 32px;
}

.about-text h2 { margin-bottom: 24px; }
.about-text > p { font-size: 15px; line-height: 2; }

/* Quick-facts strip */
.about-facts {
  list-style: none;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border-subtle);
}

.about-facts li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  letter-spacing: 0.03em;
  display: flex;
  gap: 16px;
  align-items: baseline;
}

.fact-label {
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  min-width: 80px;
}

.about-photo-wrap { display: none; position: relative; }

.about-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top;
  filter: sepia(20%) contrast(1.05);
  border: 1px solid var(--border);
}

.about-photo-label {
  position: absolute;
  bottom: -20px;
  right: 0;
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--bg-main);
  padding: 8px 12px;
  border: 1px solid var(--border-subtle);
}


/* ── 7. PROJECTS ── */
#section-projects { border-top: 1px solid var(--border-subtle); }
#section-projects h2 { margin-bottom: 0; }

.cards-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border-subtle);
  margin-top: 32px;
}

.card {
  background: var(--bg-off);
  overflow: hidden;
  transition: background var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover { background: var(--bg-card); }

/* Image wrapper — holds the tag badge */
.card-image-wrap {
  position: relative;
  overflow: hidden;
}

.card-image-wrap img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  filter: sepia(25%) contrast(1.05) saturate(0.85);
  transition: filter 0.5s ease, transform 0.5s ease;
}
.card:hover .card-image-wrap img {
  filter: sepia(8%) contrast(1.05) saturate(1);
  transform: scale(1.02);
}

/* Tech tag badge on image */
.card-tag {
  position: absolute;
  bottom: 12px;
  left: 16px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--text-light);
  background: rgba(28, 25, 20, 0.75);
  padding: 5px 10px;
  backdrop-filter: blur(4px);
}

.card-body {
  padding: 24px 28px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body h3 { font-size: 20px; margin-bottom: 10px; }
.card-body p  { font-size: 13px; flex: 1; }

/* Card link row */
.card-links {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.card-link {
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 7px;
  transition: color var(--transition);
}
.card-link:hover { color: var(--accent); opacity: 1; }


/* ── 8. SKILLS (dark band) ── */
.dark-band {
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

.dark-band-bg-text {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(120px, 18vw, 240px);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.025);
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.dark-band .section-label        { color: rgba(201, 169, 110, 0.6); }
.dark-band .section-label::after { background: rgba(201, 169, 110, 0.4); }
.dark-band h2                    { color: var(--text-light); margin-bottom: 48px; }

/* Centered wrapper for all skills content */
.skills-inner {
  max-width: 80%;
}

.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin-bottom: 56px;
}

.skill-group h3 {
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(201, 169, 110, 0.7);
  font-weight: 400;
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── SKILL BARS ── */
.skill-bars {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.skill-bars li { display: flex; flex-direction: column; gap: 8px; }

.skill-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.skill-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 300;
  color: rgba(242, 237, 230, 0.85);
  letter-spacing: 0.03em;
}

.skill-level {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(201, 169, 110, 0.5);
}

.skill-bar-track {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
}

.skill-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), rgba(201, 169, 110, 0.5));
  transition: width 1.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Development plan ordered list */
.plan-list {
  list-style: none;
  counter-reset: plan;
}

.plan-list li {
  counter-increment: plan;
  font-size: 14px;
  color: rgba(242, 237, 230, 0.45);
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 20px;
  align-items: center;
}

.plan-list li::before {
  content: counter(plan, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  opacity: 0.7;
  min-width: 22px;
}


/* ── 9. TABLE ── */
#section-table { border-top: 1px solid var(--border-subtle); }

.skills-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 32px;
}

.skills-table th {
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 400;
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.skills-table td {
  padding: 16px 20px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  transition: color var(--transition);
}

.skills-table tr:hover td    { color: var(--text-primary); }
.skills-table td:first-child { color: var(--text-primary); font-size: 14px; }


/* ── 10. CONTACT ── */
.contact-section { border-top: 1px solid var(--border-subtle); }

.contact-intro {
  font-family: var(--font-display);
  font-size: 17px;
  font-style: italic;
  color: var(--text-secondary);
  margin-top: 8px;
  margin-bottom: 40px;
}

.contact-links { display: flex; flex-direction: column; }

.contact-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: padding-left var(--transition);
}
.contact-link-item:hover { padding-left: 6px; }

.contact-link-label {
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.contact-link-value {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--text-primary);
  transition: color var(--transition);
}
.contact-link-value:hover { color: var(--accent); opacity: 1; }


/* ── 11. FOOTER ── */
footer {
  background: var(--bg-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 28px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer p {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(242, 237, 230, 0.3);
}

footer::after {
  content: 'JAKUB GROBLICKI';
  font-size: 9px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(201, 169, 110, 0.15);
  font-family: var(--font-body);
}


/* ── 12. ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow  { animation: fadeUp 0.8s ease both 0.10s; }
.hero h1       { animation: fadeUp 0.8s ease both 0.25s; }
.hero-subtitle { animation: fadeUp 0.8s ease both 0.40s; }
.hero-actions  { animation: fadeUp 0.8s ease both 0.55s; }
.hero-image-col{ animation: fadeUp 0.8s ease both 0.35s; }

/* Scroll-triggered fade-in (triggered by JS) */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

nav a.active { color: var(--accent); }


/* ── 13. TABLET (min-width: 768px) ── */
@media (min-width: 768px) {

  h1 { font-size: clamp(48px, 6vw, 96px); }
  h2 { font-size: clamp(28px, 3vw, 46px); }

  .container { padding: 80px 8%; }

  .hero {
    flex-direction: row;
    align-items: center;
    padding: 0 8%;
    gap: 64px;
  }

  .hero-actions { flex-direction: row; align-items: center; gap: 28px; }
  .profile-photo { max-width: 320px; }

  .cards-wrapper { grid-template-columns: 1fr 1fr; }
  .cards-wrapper .card { flex: unset; }
  .card-image-wrap img { height: 260px; }

  .skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 64px;
    align-items: start;
  }

  .about-photo-wrap { display: block; }
  .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
  }

  footer { padding: 28px 10%; }
}


/* ── 14. DESKTOP (min-width: 1024px) ── */
@media (min-width: 1024px) {

  .container { padding: 100px 10%; }

  .hero { padding: 0 10%; gap: 80px; }

  /* Split-tone background for hero photo column */
  .hero::after {
    content: '';
    position: absolute;
    right: 0; top: 0;
    width: 45%; height: 100%;
    background: var(--bg-off);
    z-index: 0;
  }

  .hero-text      { position: relative; z-index: 1; }
  .hero-image-col { position: relative; z-index: 1; }
  .profile-photo  { max-width: 380px; }

  .hero-scroll {
    position: absolute;
    bottom: 36px;
    left: 10%;
    z-index: 2;
    margin-top: 0;
  }

  .about-grid { gap: 80px; }
  .card-image-wrap img { height: 280px; }
  footer { padding: 32px 10%; }
}