:root {
    --bg: #ffffff;
    --bg-soft: #f5f5f7;
    --bg-elevated: #fafafa;
    --text: #1d1d1f;
    --text-muted: #6e6e73;
    --text-faint: #a1a1a6;
    --line: #e5e5ea;
    --line-soft: #ececef;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-soft: rgba(0, 113, 227, 0.08);
    --radius-sm: 10px;
    --radius: 18px;
    --radius-lg: 28px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.03);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.5;
    letter-spacing: -0.01em;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
  }

  ::selection { background: var(--accent); color: #fff; }

  a { color: inherit; text-decoration: none; }

  img { max-width: 100%; display: block; }

  .container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 32px;
  }

  /* -------- NAV -------- */
  .nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
  }
  .nav.scrolled { border-bottom-color: var(--line-soft); }
  .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 32px;
  }
  .nav-brand {
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.015em;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .nav-brand-mark {
    width: 30px; height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
  }
  .nav-brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
  }
  .nav-links a {
    font-size: 14px;
    font-weight: 450;
    color: var(--text);
    padding: 8px 14px;
    border-radius: 999px;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
  }
  .nav-links a:hover { background: var(--bg-soft); }
  .nav-links a.cta {
    background: var(--text);
    color: var(--bg);
    margin-left: 8px;
  }
  .nav-links a.cta:hover { background: #2d2d31; }

  .nav-burger {
    display: none;
    background: none;
    border: none;
    width: 40px; height: 40px;
    cursor: pointer;
    position: relative;
    border-radius: 999px;
    transition: background 0.2s var(--ease);
  }
  .nav-burger:hover { background: var(--bg-soft); }
  .nav-burger span {
    position: absolute;
    left: 11px;
    width: 18px;
    height: 1.5px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s var(--ease), opacity 0.2s var(--ease), top 0.3s var(--ease);
  }
  .nav-burger span:nth-child(1) { top: 15px; }
  .nav-burger span:nth-child(2) { top: 20px; }
  .nav-burger span:nth-child(3) { top: 25px; }
  .nav-burger.open span:nth-child(1) { top: 20px; transform: rotate(45deg); }
  .nav-burger.open span:nth-child(2) { opacity: 0; }
  .nav-burger.open span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

  .nav-mobile {
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line-soft);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.25s var(--ease);
    z-index: 99;
  }
  .nav-mobile.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-mobile ul {
    list-style: none;
    padding: 16px 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .nav-mobile a {
    display: block;
    padding: 14px 0;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.02em;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav-mobile li:last-child a { border-bottom: none; }

  /* -------- HERO -------- */
  .hero {
    padding: 160px 0 120px;
    position: relative;
    overflow: hidden;
  }
  .hero-grid {
    display: grid;
    grid-template-columns: 1fr 0.85fr;
    gap: 80px;
    align-items: center;
  }
  .hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 24px;
    letter-spacing: -0.005em;
  }
  .hero-eyebrow::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
    animation: pulse 2s var(--ease) infinite;
  }
  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }
  .hero h1 {
    font-size: clamp(44px, 6.2vw, 84px);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
  }
  .hero h1 .accent {
    color: var(--accent);
    font-weight: 500;
  }
  .hero-tagline {
    font-size: 19px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 18px;
    letter-spacing: -0.015em;
  }
  .hero-tagline .sep { color: var(--text-faint); margin: 0 6px; }
  .hero-desc {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.55;
    max-width: 520px;
    margin-bottom: 36px;
  }
  .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

  .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.005em;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
    font-family: inherit;
  }
  .btn-primary {
    background: var(--accent);
    color: #fff;
  }
  .btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0, 113, 227, 0.25); }
  .btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
  }
  .btn-secondary:hover { background: var(--bg-soft); border-color: #d2d2d7; }
  .btn-ghost {
    background: var(--bg-soft);
    color: var(--text);
  }
  .btn-ghost:hover { background: #ececef; }

  .btn .arrow { transition: transform 0.2s var(--ease); }
  .btn:hover .arrow { transform: translateX(3px); }

  .hero-portrait {
    position: relative;
    aspect-ratio: 1;
    width: 100%;
    max-width: 420px;
    margin-left: auto;
  }
  .hero-portrait-frame {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #1d1d1f 0%, #0a0a0c 70%);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18), 0 8px 30px rgba(0, 0, 0, 0.06);
  }
  .hero-portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    transform: scale(1.08);
  }
  .hero-portrait-orbit {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    border: 1px dashed var(--line);
    animation: rotate 40s linear infinite;
  }
  .hero-portrait-orbit::before {
    content: '';
    position: absolute;
    top: 50%; left: -4px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
    transform: translateY(-50%);
  }
  @keyframes rotate {
    to { transform: rotate(360deg); }
  }
  .hero-badge {
    position: absolute;
    background: #fff;
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow);
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
  }
  .hero-badge-1 { top: 8%; left: -8%; animation: float 6s ease-in-out infinite; }
  .hero-badge-2 { bottom: 12%; right: -4%; animation: float 6s ease-in-out infinite 3s; }
  @keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
  }
  .hero-badge .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #34c759;
  }
  .hero-badge-2 .dot { background: var(--accent); }

  /* -------- SECTIONS -------- */
  section {
    padding: 120px 0;
  }
  .section-soft { background: var(--bg-soft); }

  .section-head {
    margin-bottom: 64px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
  }
  .section-head-text { max-width: 640px; }
  .section-eyebrow {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .section-eyebrow::before {
    content: '';
    width: 24px; height: 1px;
    background: var(--accent);
  }
  .section-title {
    font-size: clamp(32px, 4.2vw, 52px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 18px;
  }
  .section-sub {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.5;
  }
  .section-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-faint);
    letter-spacing: 0.04em;
  }

  /* -------- TIMELINE -------- */
  .timeline {
    position: relative;
    padding-left: 0;
  }
  .timeline::before {
    content: '';
    position: absolute;
    left: 27px;
    top: 12px;
    bottom: 12px;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--line) 8%, var(--line) 92%, transparent);
  }
  .tl-item {
    position: relative;
    padding-left: 84px;
    padding-bottom: 36px;
  }
  .tl-item:last-child { padding-bottom: 0; }
  .tl-logo {
    position: absolute;
    left: 0;
    top: 16px;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
    transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  }
  .tl-logo img {
    width: 72%;
    height: 72%;
    object-fit: contain;
  }
  .tl-logo.fill img { width: 100%; height: 100%; }
  .tl-item:hover .tl-logo {
    transform: scale(1.04);
    box-shadow: var(--shadow);
    border-color: #d8d8dd;
  }
  .tl-item.current .tl-logo {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-sm);
  }

  .tl-card {
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 28px 32px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  }
  .tl-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: #d8d8dd;
  }
  .tl-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
  }
  .tl-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
  }
  .tl-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    background: var(--bg-soft);
    color: var(--text-muted);
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }
  .tl-tag.live {
    background: rgba(52, 199, 89, 0.12);
    color: #1e8e3e;
  }
  .tl-role {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
  }
  .tl-company {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 14px;
  }
  .tl-company .sep { margin: 0 8px; color: var(--text-faint); }
  .tl-desc {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.55;
  }

  /* -------- EDUCATION -------- */
  .edu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 56px;
  }
  .edu-card {
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .edu-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
  .edu-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 120px; height: 120px;
    background: radial-gradient(circle at top right, var(--accent-soft), transparent 70%);
    pointer-events: none;
  }
  .edu-icon {
    width: 64px; height: 64px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    overflow: hidden;
    position: relative;
    z-index: 1;
  }
  .edu-icon img {
    width: 80%;
    height: 80%;
    object-fit: contain;
  }
  .edu-period {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
    letter-spacing: 0.02em;
  }
  .edu-school {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    line-height: 1.2;
  }
  .edu-program {
    font-size: 15px;
    color: var(--text-muted);
  }

  .tech-section {
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    padding: 36px;
  }
  .tech-section-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
  }
  .tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .tech-tag {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    background: var(--bg-soft);
    color: var(--text);
    border: 1px solid transparent;
    transition: all 0.2s var(--ease);
    cursor: default;
  }
  .tech-tag:hover {
    background: #fff;
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
  }

  /* -------- SERVICES -------- */
  .svc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .svc-card {
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
    position: relative;
    overflow: hidden;
    cursor: pointer;
  }
  .svc-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.35s var(--ease);
    pointer-events: none;
  }
  .svc-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: #d8d8dd;
  }
  .svc-card:hover::after { opacity: 1; }
  .svc-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    color: var(--accent);
    transition: background 0.35s var(--ease), transform 0.35s var(--ease);
  }
  .svc-card:hover .svc-icon { background: var(--accent); color: #fff; transform: scale(1.05); }
  .svc-num {
    position: absolute;
    top: 32px; right: 36px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-faint);
    letter-spacing: 0.05em;
  }
  .svc-title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    line-height: 1.25;
    position: relative;
    z-index: 1;
  }
  .svc-desc {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.55;
    position: relative;
    z-index: 1;
  }

  /* -------- CV DOWNLOAD -------- */
  .cv-block {
    text-align: center;
    background: var(--text);
    color: #fff;
    border-radius: 32px;
    padding: 88px 40px;
    position: relative;
    overflow: hidden;
  }
  .cv-block::before, .cv-block::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 113, 227, 0.4), transparent 70%);
    pointer-events: none;
  }
  .cv-block::before { width: 500px; height: 500px; top: -250px; left: -150px; }
  .cv-block::after { width: 400px; height: 400px; bottom: -200px; right: -100px; background: radial-gradient(circle, rgba(0, 113, 227, 0.25), transparent 70%); }
  .cv-eyebrow {
    color: #66b3ff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
    margin-bottom: 20px;
    position: relative;
  }
  .cv-title {
    font-size: clamp(32px, 4.2vw, 52px);
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 18px;
    position: relative;
    line-height: 1.1;
  }
  .cv-desc {
    font-size: 18px;
    color: #a1a1a6;
    margin-bottom: 40px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
  }
  .cv-block .btn-primary { position: relative; }

  /* -------- CONTACT -------- */
  .contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
    align-items: start;
  }
  .form {
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
  }
  .field {
    margin-bottom: 22px;
  }
  .field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: -0.005em;
  }
  .field input, .field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
    resize: vertical;
  }
  .field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
  }
  .field textarea { min-height: 130px; }
  .form-submit { width: 100%; justify-content: center; }
  .form-status {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    background: rgba(52, 199, 89, 0.12);
    color: #1e8e3e;
    display: none;
    align-items: center;
    gap: 10px;
  }
  .form-status.show { display: flex; animation: slideIn 0.4s var(--ease); }
  @keyframes slideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .info-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .info-intro {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.35;
    margin-bottom: 28px;
    color: var(--text);
  }
  .info-intro .muted { color: var(--text-muted); }
  .info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .info-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line-soft);
    transition: padding 0.2s var(--ease);
  }
  .info-item:last-child { border-bottom: none; }
  .info-item a:hover { color: var(--accent); }
  .info-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    flex-shrink: 0;
  }
  .info-label {
    font-size: 12px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
  }
  .info-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    transition: color 0.2s var(--ease);
  }
  .info-extras {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--line-soft);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }
  .info-chip {
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--bg-soft);
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .info-chip svg { color: var(--accent); }

  /* -------- FOOTER -------- */
  footer {
    border-top: 1px solid var(--line-soft);
    padding: 40px 0;
  }
  .footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
  }
  .footer-brand {
    font-size: 14px;
    color: var(--text-muted);
  }
  .footer-links {
    display: flex;
    gap: 8px;
  }
  .footer-links a {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: var(--bg-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
  }
  .footer-links a:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }

  /* -------- REVEAL ANIMATIONS -------- */
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  }
  .reveal.in {
    opacity: 1;
    transform: translateY(0);
  }
  .reveal-delay-1 { transition-delay: 0.08s; }
  .reveal-delay-2 { transition-delay: 0.16s; }
  .reveal-delay-3 { transition-delay: 0.24s; }
  .reveal-delay-4 { transition-delay: 0.32s; }

  /* -------- RESPONSIVE -------- */
  @media (max-width: 900px) {
    .nav-links { display: none; }
    .nav-burger { display: block; }
    .hero { padding: 120px 0 80px; }
    .hero-grid { grid-template-columns: 1fr; gap: 56px; text-align: center; }
    .hero-desc { margin-left: auto; margin-right: auto; }
    .hero-cta { justify-content: center; }
    .hero-portrait { max-width: 280px; margin: 0 auto; }
    .hero-eyebrow { margin-left: auto; margin-right: auto; }
    section { padding: 80px 0; }
    .section-head { margin-bottom: 48px; }
    .edu-grid { grid-template-columns: 1fr; }
    .svc-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .cv-block { padding: 64px 28px; }
    .container { padding: 0 24px; }
    .nav-inner { padding: 0 24px; }
    .tl-card { padding: 24px; }
    .form { padding: 28px; }
    .edu-card { padding: 28px; }
    .svc-card { padding: 32px; }
  }
  @media (max-width: 500px) {
    .tl-head { flex-direction: column; align-items: flex-start; gap: 8px; }
    .hero-badge { display: none; }
  }


/* ============================================ */
/* SUBPAGE STYLES                               */
/* ============================================ */

/* Active nav link */
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-soft);
}
.nav-links a.cta.active {
  background: var(--accent);
  color: #fff;
}

/* Page header (slim hero for subpages) */
.page-header {
  padding: 140px 0 64px;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
.page-header.soft { background: var(--bg-soft); }
.page-header::before {
  content: '';
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse at center, var(--accent-soft), transparent 60%);
  pointer-events: none;
  opacity: 0.5;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}
.breadcrumb a { color: var(--text-muted); transition: color 0.2s var(--ease); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--text-faint); }
.breadcrumb .here { color: var(--text); }
.page-title {
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 24px;
  position: relative;
}
.page-lede {
  font-size: 20px;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.5;
  position: relative;
}
.page-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
  flex-wrap: wrap;
  position: relative;
}
.page-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}
.page-meta-num {
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.02em;
}
.page-meta-divider {
  width: 1px;
  height: 32px;
  background: var(--line);
}

/* Generic panel for subpage content */
.panel {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 700px) {
  .panel { padding: 32px 24px; border-radius: 20px; }
  .page-header { padding: 110px 0 48px; }
}

/* Section tiles (on landing) */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}
.tile {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
}
.tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: #d8d8dd;
}
.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.tile:hover::after { opacity: 1; }
.tile-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}
.tile-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}
.tile-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}
.tile-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 500;
  font-size: 14px;
  position: relative;
  z-index: 1;
}
.tile-link svg { transition: transform 0.3s var(--ease); }
.tile:hover .tile-link svg { transform: translateX(4px); }

/* Tile sizing */
.tile-12 { grid-column: span 12; }
.tile-8 { grid-column: span 8; }
.tile-6 { grid-column: span 6; }
.tile-4 { grid-column: span 4; }

.tile-feature {
  background: var(--text);
  color: #fff;
  position: relative;
  min-height: 320px;
}
.tile-feature .tile-num { color: rgba(255,255,255,0.5); }
.tile-feature .tile-desc { color: rgba(255,255,255,0.7); }
.tile-feature .tile-link { color: #66b3ff; }
.tile-feature::before {
  content: '';
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0,113,227,0.5), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.tile-feature::after { display: none; }
.tile-feature .tile-glyph {
  position: absolute;
  top: 32px; right: 32px;
  opacity: 0.4;
}

@media (max-width: 900px) {
  .tile-12, .tile-8, .tile-6, .tile-4 { grid-column: span 12; }
  .tile { min-height: 220px; padding: 28px; }
  .tile-title { font-size: 24px; }
}

/* Subpage main content section */
.subpage-main {
  padding: 80px 0 120px;
}
@media (max-width: 700px) {
  .subpage-main { padding: 56px 0 80px; }
}

/* Cert / list / fact rows for richer subpages */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  margin-bottom: 48px;
}
.fact {
  padding: 32px;
  border-right: 1px solid var(--line-soft);
}
.fact:last-child { border-right: none; }
.fact-num {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  line-height: 1;
}
.fact-num .accent { color: var(--accent); }
.fact-label {
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}
@media (max-width: 700px) {
  .fact-grid { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(2) { border-right: none; }
  .fact:nth-child(1), .fact:nth-child(2) { border-bottom: 1px solid var(--line-soft); }
  .fact { padding: 24px; }
}

/* Skill-grouped section (for education subpage) */
.skill-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 700px) {
  .skill-groups { grid-template-columns: 1fr; }
}
.skill-group {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 28px;
}
.skill-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.skill-group-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.skill-group-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.skill-group .tech-tags { gap: 6px; }
.skill-group .tech-tag { padding: 6px 12px; font-size: 12px; }

/* Process steps for services subpage */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 56px;
}
.process-step {
  position: relative;
  padding-top: 24px;
}
.process-step::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}
.process-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.process-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}
.process-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}
@media (max-width: 700px) {
  .process { grid-template-columns: 1fr; gap: 24px; }
}

/* CV preview block */
.cv-preview {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}
@media (max-width: 800px) { .cv-preview { grid-template-columns: 1fr; } }
.cv-preview-body { padding: 56px 48px; }
.cv-preview-side {
  background: linear-gradient(180deg, #fafafa, #f5f5f7);
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--line-soft);
}
@media (max-width: 800px) { .cv-preview-side { border-left: none; border-top: 1px solid var(--line-soft); } }
.cv-key {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
.cv-key:last-child { border-bottom: none; }
.cv-key-label { color: var(--text-muted); }
.cv-key-value { font-weight: 500; }

/* Final CTA strip */
.cta-strip {
  text-align: center;
  padding: 80px 32px;
  margin-top: 100px;
  border-top: 1px solid var(--line-soft);
}
.cta-strip h3 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}
.cta-strip p {
  color: var(--text-muted);
  margin-bottom: 28px;
}


/* ============================================ */
/* REALIZACJE / PORTFOLIO PAGE                  */
/* ============================================ */

.cat-section {
  padding: 80px 0;
  border-top: 1px solid var(--line-soft);
}
.cat-section:first-of-type { border-top: none; padding-top: 24px; }
.cat-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 32px;
  flex-wrap: wrap;
}
.cat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.cat-title {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 8px;
}
.cat-sub {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.5;
}
.cat-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-faint);
  padding: 6px 12px;
  background: var(--bg-soft);
  border-radius: 999px;
  white-space: nowrap;
}

/* Photo gallery — varied sizes via grid-row spans */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.gal-item {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-soft);
  cursor: pointer;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line-soft);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.gal-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.gal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.gal-item:hover img { transform: scale(1.04); }
.gal-item.rot-cw img { transform: rotate(90deg) scale(1.34); }
.gal-item.rot-cw:hover img { transform: rotate(90deg) scale(1.4); }
.gal-item.wide { grid-column: span 8; aspect-ratio: 16 / 11; }
.gal-item.tall { grid-column: span 4; }
.gal-item.med { grid-column: span 6; aspect-ratio: 4 / 3; }
.gal-item.land { grid-column: span 4; aspect-ratio: 4 / 3; }
.gal-item.sq { grid-column: span 4; aspect-ratio: 1; }
.gal-item.thin { grid-column: span 3; }
.gal-caption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  right: 16px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  letter-spacing: -0.005em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  pointer-events: none;
}
.gal-item:hover .gal-caption { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(6, 1fr); }
  .gal-item.wide, .gal-item.med { grid-column: span 6; }
  .gal-item.tall, .gal-item.land, .gal-item.sq, .gal-item.thin { grid-column: span 3; }
}
@media (max-width: 600px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gal-item, .gal-item.wide, .gal-item.med, .gal-item.tall, .gal-item.land, .gal-item.sq, .gal-item.thin { grid-column: span 2; aspect-ratio: 4 / 3; }
  .gal-caption { opacity: 1; transform: translateY(0); }
}

/* Project cards (web + apps) */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 800px) { .proj-grid { grid-template-columns: 1fr; } }
.proj {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.proj:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #d8d8dd;
}
.proj-thumb {
  aspect-ratio: 16 / 10;
  background: var(--bg-soft);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}
.proj-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.proj:hover .proj-thumb img { transform: scale(1.04); }
.proj-year {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(255,255,255,0.95);
  padding: 6px 12px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
}
.proj-body { padding: 28px; }
.proj-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 8px;
}
.proj-course {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-style: italic;
}
.proj-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 20px;
}
.proj-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.proj-tech {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-soft);
  color: var(--text);
}
.proj-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.proj-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-soft);
  color: var(--text);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.proj-link:hover { background: var(--accent); color: #fff; }
.proj-link.primary { background: var(--text); color: #fff; }
.proj-link.primary:hover { background: var(--accent); }

/* Category jump nav (sticky tabs at top of subpage-main) */
.cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  margin-bottom: 32px;
  position: sticky;
  top: 80px;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.cat-nav a {
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.cat-nav a:hover { background: var(--bg-soft); }
.cat-nav a.active { background: var(--text); color: #fff; }
@media (max-width: 700px) {
  .cat-nav { 
    overflow-x: auto; 
    flex-wrap: nowrap; 
    border-radius: 16px; 
    -webkit-overflow-scrolling: touch;
  }
  .cat-nav a { font-size: 12px; padding: 8px 14px; }
}


/* ============================================ */
/* THESIS PROJECT BLOCK                         */
/* ============================================ */
.thesis-block {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.thesis-hero {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--text);
  overflow: hidden;
}
.thesis-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.thesis-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.92) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px;
  color: #fff;
}
.thesis-badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
  border: 1px solid rgba(255,255,255,0.25);
}
.thesis-hero-overlay h3 {
  font-size: clamp(24px, 3.4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 12px;
  max-width: 760px;
}
.thesis-hero-overlay p {
  font-size: 15px;
  color: rgba(255,255,255,0.85);
  max-width: 640px;
  line-height: 1.55;
}
@media (max-width: 700px) {
  .thesis-hero-overlay { padding: 24px; }
  .thesis-hero-overlay p { display: none; }
}

.thesis-body {
  padding: 48px;
}
@media (max-width: 700px) { .thesis-body { padding: 28px 24px; } }

.thesis-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 40px;
}

.thesis-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-soft);
}
@media (max-width: 900px) { .thesis-features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .thesis-features { grid-template-columns: 1fr; } }
.thesis-feature-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.thesis-feature h4 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}
.thesis-feature p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.thesis-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
@media (max-width: 700px) { .thesis-gallery { grid-template-columns: 1fr; } }
.thesis-gallery figure {
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.thesis-gallery figure:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.thesis-gallery img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #fff;
  border-bottom: 1px solid var(--line-soft);
}
.thesis-gallery figcaption {
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: -0.005em;
}

.thesis-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px solid var(--line-soft);
}
.thesis-meta {
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.01em;
}
