/* ============================
   INDEX PAGE — specific styles
   Requires: styles.css
============================ */

/* ============================
   HERO META-ROW  (index only)
============================ */
.hero .meta-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
    gap: 20px 28px;
    margin-top: clamp(36px, 8vw, 96px);
    padding-top: 24px;
    border-top: 1px solid var(--rule);
    opacity: 0;
    animation: fadeUp .9s 1.1s cubic-bezier(.2, .8, .2, 1) forwards;
}
.hero .meta-row .cell { display: flex; flex-direction: column; gap: 6px; }
.hero .meta-row .cell .k {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: .08em;
}
.hero .meta-row .cell .v { font-size: 14.5px; color: var(--ink); }
.hero .meta-row .cell .v > span[style] { flex-shrink: 0 !important; min-width: 7px; min-height: 7px; }
.hero .meta-row .cell .v a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
    transition: border-color .25s;
}
.hero .meta-row .cell .v a:hover { border-color: var(--ink); }

/* ============================
   SECTIONS
============================ */
section.block {
    padding: var(--section-y) 0;
    border-top: 1px solid var(--rule-2);
}
.section-head {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 40px;
    margin-bottom: clamp(36px, 8vw, 96px);
    align-items: baseline;
}
.section-head .idx {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-3);
    letter-spacing: .08em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-head .idx::before {
    content: "";
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
}
.section-head h2 {
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(26px, 4.6vw, 60px);
    line-height: 1;
    letter-spacing: -0.028em;
    margin: 0;
    color: var(--ink);
}
.section-head h2 em {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    color: var(--ink-2);
}
@media (max-width: 640px) {
    .section-head { grid-template-columns: 1fr; gap: 12px; }
}

/* ============================
   ABOUT
============================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: clamp(32px, 6vw, 96px);
    align-items: start;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

.portrait {
    position: relative;
    width: min(280px, 70%);
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-2);
    margin: 0 auto;
}
.portrait img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05) brightness(.85);
    transition: filter .8s ease, transform 1.2s cubic-bezier(.2, .8, .2, 1);
}
.portrait:hover img { filter: grayscale(0) contrast(1.02) brightness(1); transform: scale(1.03); }
.portrait .tag {
    position: absolute;
    left: 14px; bottom: 14px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--bg);
    background: color-mix(in oklab, var(--ink) 85%, transparent);
    padding: 6px 10px;
    border-radius: 2px;
    letter-spacing: .06em;
}
.about-body p {
    font-size: clamp(15px, 1.6vw, 22px);
    line-height: 1.6;
    color: var(--ink);
    margin: 0 0 18px;
    text-wrap: pretty;
}
.about-body p:last-of-type { color: var(--ink-2); }
.about-body .stat-row {
    display: flex;
    gap: clamp(20px, 5vw, 48px);
    margin-top: 28px;
    flex-wrap: wrap;
}
.about-body .stat .num {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.03em;
    line-height: 1;
    display: block;
    color: var(--ink);
}
.about-body .stat .num em { font-family: var(--serif); font-style: italic; color: var(--accent); }
.about-body .stat .lbl {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-top: 8px;
    display: block;
}

/* ============================
   EXPERIENCE
============================ */
.xp-list { display: flex; flex-direction: column; }
.xp-item {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: 32px;
    align-items: start;
    padding: 24px 0;
    border-top: 1px solid var(--rule-2);
    position: relative;
    transition: padding .45s cubic-bezier(.2, .8, .2, 1);
}
.xp-item:last-child { border-bottom: 1px solid var(--rule-2); }
.xp-item::after {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 1px;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
.xp-item:hover::after { transform: scaleX(1); }
.xp-item:hover { padding-left: 14px; }
.xp-item .yr { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); letter-spacing: .03em; padding-top: 4px; }
.xp-item h3 {
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(17px, 2.4vw, 30px);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0 0 6px;
    color: var(--ink);
}
.xp-item .co { font-family: var(--display); font-size: 14px; color: var(--ink-2); }
.xp-item .co em { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 15px; }
.xp-item .bullets {
    margin: 12px 0 0; padding: 0;
    list-style: none;
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .55s cubic-bezier(.2, .8, .2, 1), margin .55s;
}
.xp-item .bullets > div { overflow: hidden; }
.xp-item.open .bullets { grid-template-rows: 1fr; }
.xp-item .bullets li {
    font-size: 14.5px;
    color: var(--ink-2);
    line-height: 1.6;
    padding: 7px 0 7px 20px;
    position: relative;
}
.xp-item .bullets li::before {
    content: "";
    position: absolute;
    left: 0; top: 15px;
    width: 10px; height: 1px;
    background: var(--ink-3);
}
.xp-item .toggle {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: .08em;
    background: none; border: 0;
    cursor: pointer;
    padding: 8px 0;
    align-self: start;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color .2s;
    white-space: nowrap;
    min-height: 44px;
}
.xp-item .toggle:hover { color: var(--ink); }
.xp-item .toggle .ic {
    display: inline-block;
    width: 14px; height: 14px;
    position: relative;
    transition: transform .4s cubic-bezier(.2, .8, .2, 1);
    flex-shrink: 0;
}
.xp-item .toggle .ic::before,
.xp-item .toggle .ic::after {
    content: "";
    position: absolute;
    inset: 0; margin: auto;
    background: currentColor;
}
.xp-item .toggle .ic::before { height: 1px; width: 100%; top: 50%; }
.xp-item .toggle .ic::after  { width: 1px; height: 100%; left: 50%; transition: transform .4s; }
.xp-item.open .toggle .ic::after { transform: scaleY(0); }
.xp-item.open .toggle { color: var(--ink); }

@media (max-width: 720px) {
    .xp-item { grid-template-columns: 1fr auto; gap: 16px; }
    .xp-item .yr { grid-column: 1 / -1; padding-top: 0; }
}
@media (max-width: 480px) {
    .xp-item { grid-template-columns: 1fr; }
    .xp-item:hover { padding-left: 0; }
    .xp-item::after { display: none; }
}

/* ============================
   SKILLS
============================ */
.skills-grid { display: grid; grid-template-columns: 160px 1fr; gap: 16px 48px; }
.skills-group { display: contents; }
.skills-group .g-label {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-3);
    letter-spacing: .06em;
    text-transform: uppercase;
    padding-top: 14px;
}
.skills-group .g-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0 28px;
    border-bottom: 1px solid var(--rule-2);
}
.skills-group:last-child .g-items { border-bottom: 0; }
.chip {
    font-family: var(--display);
    font-size: 14px;
    font-weight: 400;
    color: var(--ink);
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--rule);
    background: transparent;
    transition: all .35s cubic-bezier(.2, .8, .2, 1);
    cursor: default;
    position: relative;
    will-change: transform;
}
.chip:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: translateY(-2px); }
.chip.featured { border-color: var(--accent); color: var(--accent); }
.chip.featured:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
@media (max-width: 600px) {
    .skills-grid { grid-template-columns: 1fr; gap: 0; }
    .skills-group { display: block; border-top: 1px solid var(--rule-2); padding-top: 16px; margin-bottom: 4px; }
    .skills-group:first-child { border-top: 0; }
    .skills-group .g-label { padding-top: 0; padding-bottom: 10px; }
    .skills-group .g-items { border-bottom: 0; padding-bottom: 16px; }
    .chip { font-size: 13px; padding: 7px 12px; }
}

/* ============================
   TICKER / MARQUEE
============================ */
.ticker {
    overflow: hidden;
    border-block: 1px solid var(--rule-2);
    padding: 18px 0;
    margin-top: 48px;
    white-space: nowrap;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker .track {
    display: inline-flex;
    gap: 40px;
    animation: scroll 40s linear infinite;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--ink-2);
    letter-spacing: .02em;
}
.ticker:hover .track { animation-play-state: paused; }
.ticker .track span { display: inline-flex; align-items: center; gap: 40px; }
.ticker .track span::after { content: "●"; color: var(--accent); font-size: 7px; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ============================
   CONTACT
============================ */
.contact {
    padding: var(--section-y) 0 clamp(56px, 10vw, 100px);
    border-top: 1px solid var(--rule-2);
}
.contact h2 {
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(32px, 7vw, 104px);
    letter-spacing: -0.035em;
    line-height: .98;
    margin: 0 0 clamp(24px, 5vw, 48px);
    max-width: 12ch;
}
.contact h2 em { font-family: var(--serif); font-style: italic; color: var(--accent); }
.contact .cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: var(--display);
    font-size: clamp(17px, 2.4vw, 30px);
    color: var(--ink);
    text-decoration: none;
    padding: 14px 0;
    border-bottom: 1px solid var(--ink);
    letter-spacing: -0.01em;
    max-width: 100%;
    word-break: break-all;
}
.contact .cta .arrow {
    display: inline-block;
    width: 28px; height: 14px;
    position: relative;
    transition: transform .5s cubic-bezier(.2, .8, .2, 1);
    flex-shrink: 0;
}
.contact .cta .arrow::before {
    content: "";
    position: absolute;
    left: 0; right: 4px; top: 50%;
    height: 1px;
    background: currentColor;
}
.contact .cta .arrow::after {
    content: "";
    position: absolute;
    right: 0; top: 50%;
    width: 10px; height: 10px;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    transform: translateY(-50%) rotate(45deg);
}
.contact .cta:hover .arrow { transform: translateX(8px); }

/* ============================
   LINKS GRID
============================ */
.links {
    margin-top: clamp(40px, 8vw, 88px);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--rule);
}
.links a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 16px 20px 0;
    font-family: var(--display);
    font-size: 15px;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
    position: relative;
    overflow: hidden;
    min-height: 44px;
}
.links a + a { border-left: 1px solid var(--rule); padding-left: 16px; }
.links a .lbl { position: relative; z-index: 2; transition: transform .45s cubic-bezier(.2, .8, .2, 1); display: inline-block; }
.links a .ar { font-family: var(--mono); font-size: 13px; color: var(--ink-3); position: relative; z-index: 2; transition: transform .45s cubic-bezier(.2, .8, .2, 1), color .3s; }
.links a::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--ink);
    transform: translateY(101%);
    transition: transform .5s cubic-bezier(.2, .8, .2, 1);
    z-index: 1;
}
.links a:hover::before { transform: translateY(0); }
.links a:hover { color: var(--bg); }
.links a:hover .lbl { transform: translateX(8px); }
.links a:hover .ar { color: var(--bg); transform: translateX(4px); }
@media (max-width: 600px) {
    .links { grid-template-columns: 1fr; }
    .links a { padding: 20px 0; }
    .links a + a { border-left: 0; padding-left: 0; }
}
