/* ============================================
   Clean, Characterful Portfolio
   ============================================ */

:root {
    color-scheme: light;
    --bg: #fafaf9;
    --panel: #ffffff;
    --panel-soft: #ffffff;
    --border: #e5e7eb;
    --border-strong: #d1d5db;
    --muted: #596579;
    --muted-2: #687386;
    --text: #172033;
    --text-heading: #0c1f3a;
    --text-secondary: #3f4f64;
    --text-tertiary: #58687d;
    --accent: #0f5f8c;
    --accent-hover: #0b4d73;
    --accent-soft: rgba(15, 95, 140, 0.1);
    --bg-secondary: #edf1f6;
    --bg-tertiary: #f9fbfd;
    --bg-image: #d7dde6;
    --radius: 8px;
    --shadow: none;
    --shadow-soft: none;
    --font-body: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: var(--font-body);
}

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

html {
    scroll-behavior: smooth;
}

/* ============================================
   Balloons Birthday Animation
   ============================================ */
#balloon-birthday-container {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.balloon-wrapper {
    position: absolute;
    bottom: -220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: balloon-rise var(--duration, 10s) ease-in forwards;
    animation-delay: var(--delay, 0s);
}

.balloon-birthday {
    width: 58px;
    height: 70px;
    border-radius: 50%;
    background: var(--color, #ff6b6b);
    position: relative;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.2));
}

/* Gleam highlight */
.balloon-birthday::after {
    content: '';
    position: absolute;
    top: 16%;
    left: 20%;
    width: 28%;
    height: 22%;
    background: rgba(255,255,255,0.42);
    border-radius: 50%;
    transform: rotate(-35deg);
}

/* Knot at bottom */
.balloon-birthday::before {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 8px solid var(--color, #ff6b6b);
}

.balloon-string {
    width: 1.5px;
    height: 78px;
    background: linear-gradient(to bottom, rgba(90,80,80,0.65), rgba(140,130,130,0.15));
    animation: string-sway var(--sway, 2.5s) ease-in-out infinite alternate;
    transform-origin: top center;
}

@keyframes balloon-rise {
    0%   { transform: translateY(0);       opacity: 1; }
    75%  {                                 opacity: 1; }
    100% { transform: translateY(-115vh);  opacity: 0; }
}

@keyframes string-sway {
    from { transform: rotate(-6deg); }
    to   { transform: rotate(6deg); }
}

#birthday-message {
    position: fixed;
    top: 14vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #fff0f6 0%, #fff9ec 50%, #f0f9ff 100%);
    border: 1.5px solid rgba(255,255,255,0.9);
    padding: 1.1rem 2rem;
    border-radius: var(--radius);
    box-shadow:
        0 8px 32px rgba(215, 38, 96, 0.15),
        0 2px 8px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.8);
    z-index: 10000;
    pointer-events: none;
    white-space: nowrap;
    animation: birthday-pop 0.6s cubic-bezier(.68,-0.55,.27,1.55) forwards;
}

.bday-emoji {
    font-size: 1.8rem;
    line-height: 1;
}

.bday-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.bday-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    background: linear-gradient(90deg, #d72660, #f59e0b, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0;
}

.bday-sub {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.82rem;
    color: #8a7a8a;
    font-weight: 400;
    letter-spacing: 0.01em;
}

@keyframes birthday-pop {
    0%   { transform: translateX(-50%) scale(0.6) translateY(-10px); opacity: 0; }
    70%  { transform: translateX(-50%) scale(1.04) translateY(0);    opacity: 1; }
    100% { transform: translateX(-50%) scale(1)    translateY(0);    opacity: 1; }
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    position: relative;
    padding: 0 0 5rem;
}

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

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.9rem max(1.25rem, calc((100vw - 1060px) / 2));
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    transition: background 0.3s ease, border-color 0.3s ease;
}

nav .logo {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--text-heading);
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    list-style: none;
    padding: 0.18rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--panel-soft);
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.25rem 0.72rem;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted);
    border: none;
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
    color: var(--text-heading);
    background: var(--bg-secondary);
}

/* Main */
main {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 2rem 3.25rem;
}

/* Hero */
.hero {
    padding: 7.5rem 0 3.5rem;
    position: relative;
}

.hero-content {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.hero-photo {
    flex-shrink: 0;
    width: 152px;
    height: 152px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-image);
    border: 1px solid var(--border-strong);
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-text {
    flex: 1;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.15rem, 5vw, 2.85rem);
    font-weight: 600;
    letter-spacing: 0;
    margin-bottom: 0.35rem;
    line-height: 1.08;
}

.hero .subtitle {
    font-family: var(--font-heading);
    font-size: 0.98rem;
    color: var(--muted);
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
}

.hero .intro {
    color: var(--text-secondary);
    margin-bottom: 1.45rem;
    max-width: 690px;
}

.hero .links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.hero .links a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0.28rem 0.62rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel-soft);
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 500;
    transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}

.hero .links a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

.hero .sep {
    display: none;
}

.hero .construction-note {
    margin-top: 0.85rem;
    color: #b91c1c;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Latest Highlight */
.latest-section {
    padding-top: 0;
}

.latest-card {
    display: grid;
    grid-template-columns: minmax(220px, 0.62fr) minmax(320px, 1fr);
    gap: 1.35rem;
    align-items: stretch;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(15, 95, 140, 0.08), transparent 42%),
        var(--panel-soft);
    box-shadow: var(--shadow-soft);
}

.latest-media {
    justify-self: center;
    width: 100%;
    max-width: 300px;
    min-width: 0;
    aspect-ratio: 9 / 16;
    border-radius: var(--radius);
    overflow: hidden;
    background: #0b111a;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

.latest-media video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.latest-right {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    min-width: 0;
}

.latest-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.latest-photo,
.latest-demo {
    position: relative;
    min-width: 0;
    min-height: 160px;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-tertiary);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.latest-photo img,
.latest-demo video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.latest-demo video {
    background: #0b111a;
    object-fit: contain;
}

.latest-photo figcaption,
.latest-demo span {
    position: absolute;
    inset: auto 0 0 0;
    padding: 0.5rem;
    background: linear-gradient(to top, rgba(11, 17, 26, 0.74), transparent);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
}

.latest-copy {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.7rem;
    padding: 0.35rem 0.2rem;
}

.latest-eyebrow {
    width: fit-content;
    padding: 0.25rem 0.55rem;
    border: 1px solid rgba(15, 95, 140, 0.24);
    border-radius: var(--radius);
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.latest-copy h2 {
    margin: 0;
    font-size: clamp(1.2rem, 3vw, 1.55rem);
    line-height: 1.25;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-heading);
}

.latest-copy .latest-quote {
    margin-top: -0.2rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-tertiary);
    line-height: 1.45;
}

.latest-copy p {
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.65;
}

.latest-link {
    width: fit-content;
    margin-top: 0.15rem;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

.latest-link:hover {
    color: var(--accent-hover);
    border-bottom-color: var(--accent-hover);
}

/* Sections */
section {
    position: relative;
    padding: 2.85rem 0;
    margin: 0;
    background: transparent;
    border-radius: 0;
    border-top: 1px solid var(--border);
    box-shadow: none;
    backdrop-filter: none;
    overflow: visible;
    scroll-margin-top: 5.5rem;
}

section h2 {
    font-family: var(--font-heading);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: 1.35rem;
    padding: 0;
    border-radius: 0;
    background: none;
    border: none;
}

/* Entry (for education, research, experience) */
.entry {
    display: flex;
    gap: 1rem;
    margin: 0 -0.75rem 1.05rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    transition: background 0.18s ease, transform 0.18s ease;
}

.entry:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateX(2px);
}

.entry-link {
    cursor: pointer;
}

.entry-link .entry-title::after {
    content: '↗';
    display: inline-block;
    margin-left: 0.45rem;
    color: var(--muted-2);
    font-size: 0.72rem;
    transform: translateY(-0.08rem);
    transition: color 0.2s, transform 0.2s;
}

.entry-link:hover .entry-title::after {
    color: var(--accent);
    transform: translate(0.08rem, -0.08rem);
}

.entry:last-child {
    margin-bottom: 0;
}

.entry-left {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel-soft);
}

.entry-left.dual-logo {
    width: 82px;
    gap: 0.5rem;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.92;
}

.entry-initials {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--accent);
}

.dual-logo .logo-img {
    width: 36px;
    height: 36px;
}

.hackathon-logo-wrap {
    width: 96px;
    height: 40px;
    border-radius: 8px;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.35rem 0.45rem;
    overflow: hidden;
}

.hackathon-logo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.entry-main {
    flex: 1;
    min-width: 0;
}

#mina, #swarm-control, #ntu-research { scroll-margin-top: 8rem; }

.research-photo { max-width: 400px; margin: 0.85rem 0 0; }
.research-photo a { display: block; }
.research-photo img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
}

.research-video { max-width: 400px; margin: 0.85rem 0 0; }

.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 200px;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: #eef0f2;
}

.video-preview,
.video-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-preview { padding: 0; background: none; cursor: pointer; }
.video-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }

.video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    padding-left: 3px;
    border-radius: 50%;
    background: #fff;
    color: var(--accent);
    font-size: 1.2rem;
    box-shadow: 0 2px 12px #0003;
}

.video-preview:hover .video-play { background: var(--accent-soft); }
.video-preview:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.research-video figcaption { margin-top: 0.4rem; color: var(--muted-2); font-size: 0.8rem; }

.project-media-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 1rem 0 0.5rem;
    color: var(--muted-2);
    font-size: 0.8rem;
}

.project-media-header p { margin: 0; }

.project-media-controls { display: flex; gap: 0.35rem; }
.project-media-controls[hidden] { display: none; }

.project-media-controls button {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: var(--panel);
    color: var(--text-heading);
    font: inherit;
    cursor: pointer;
}

.project-media-controls button:disabled { opacity: 0.35; cursor: default; }

.project-media {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(75%, 180px);
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    padding-bottom: 0.5rem;
}

.project-media figure { margin: 0; min-width: 0; scroll-snap-align: start; }
.project-media figure > a { display: block; }

.project-media video,
.project-media img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: contain;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: #f0f0ee;
}

.project-media figcaption {
    margin-top: 0.4rem;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--muted-2);
}

.project-media:focus-visible,
.project-media-controls button:focus-visible,
.project-media a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.entry-title {
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 0.1rem;
    color: var(--text-heading);
}

.entry-org {
    font-size: 0.96rem;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
}

.entry-meta {
    font-size: 0.9rem;
    color: var(--muted-2);
    margin-bottom: 0.35rem;
}

.entry-desc {
    font-size: 0.96rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.entry-projects {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.9rem;
    margin-top: 0.75rem;
}

.entry-project-title {
    font-size: 0.96rem;
    font-weight: 500;
    line-height: 1.55;
    color: var(--text-heading);
    margin-bottom: 0.15rem;
}

.entry-project .entry-meta:last-child {
    margin-bottom: 0;
}

.research-section .entry-title {
    font-size: 1rem;
    line-height: 1.55;
}

.lab-professor {
    font-size: 0.9em;
    font-weight: 400;
    white-space: nowrap;
}

.research-section .entry-org {
    margin-bottom: 0.35rem;
}

.resource-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.resource-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 34px;
    padding: 0.3rem 0.65rem;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: var(--panel);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.resource-links a:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.resource-links a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Publications */
.publication-entry {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.publication-entry:last-child {
    margin-bottom: 0;
}

.publication-year {
    flex-shrink: 0;
    min-width: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--muted);
    font-size: 0.9rem;
}

.publication-content {
    flex: 1;
}

.publication-title {
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.publication-meta {
    font-size: 0.95rem;
    color: var(--muted-2);
}

.publication-venue {
    font-weight: 500;
    color: var(--text-heading);
}

/* Projects */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.project-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel-soft);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.66) inset;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
    background: var(--panel);
}

.project-image {
    flex-shrink: 0;
    width: 74px;
    height: 74px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.project-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-heading);
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.55;
}

.project-arrow {
    color: var(--text-tertiary);
    font-size: 1.25rem;
    transition: transform 0.2s, color 0.2s;
    margin-left: 0.5rem;
}

.project-card:hover .project-arrow {
    transform: translateX(4px);
    color: var(--accent);
}

/* LinkedIn */
.linkedin-section {
    padding-top: 2.35rem;
}

.linkedin-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.linkedin-heading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.linkedin-heading h2 {
    margin-bottom: 0;
}

.linkedin-logo {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #0a66c2;
    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
}

.linkedin-logo-small {
    width: 21px;
    height: 21px;
    border-radius: 5px;
    font-size: 0.72rem;
}

.linkedin-profile-link {
    flex-shrink: 0;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    padding: 0.36rem 0.68rem;
    border: 1px solid rgba(10, 102, 194, 0.28);
    border-radius: var(--radius);
    background: rgba(10, 102, 194, 0.06);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.linkedin-profile-link:hover {
    color: #0a66c2;
    border-color: rgba(10, 102, 194, 0.48);
    background: rgba(10, 102, 194, 0.1);
}

.linkedin-feed {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.95rem;
}

.linkedin-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.68rem;
    min-height: 238px;
    padding: 1.05rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(10, 102, 194, 0.055), transparent 42%),
        var(--panel-soft);
    box-shadow: 0 10px 24px -22px rgba(22, 27, 38, 0.45);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.linkedin-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #0a66c2, #2f8f83);
}

.linkedin-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.linkedin-card-top {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.linkedin-author {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.linkedin-dot {
    color: var(--muted-2);
}

.linkedin-kicker {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.linkedin-title {
    font-family: var(--font-heading);
    font-size: 1.06rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-heading);
}

.linkedin-excerpt {
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.6;
    padding-left: 0.85rem;
    border-left: 2px solid rgba(10, 102, 194, 0.22);
}

.linkedin-meta {
    margin-top: auto;
    width: fit-content;
    max-width: 100%;
    padding: 0.36rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-tertiary);
    font-family: var(--font-heading);
    font-size: 0.78rem;
    color: var(--muted);
}

.linkedin-card-action {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    transition: color 0.2s;
}

.linkedin-card:hover .linkedin-card-action {
    color: #0a66c2;
}

/* Coursework */
.coursework-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.3rem;
}

.course-category {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0 0 0 1rem;
    border-left: 2px solid var(--border);
}

.category-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.course-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.course-list li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding-left: 0.9rem;
    position: relative;
}

.course-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--muted-2);
}

/* Skills */
.skills-text {
    max-width: 720px;
    font-size: 0.98rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.skills-text strong {
    color: var(--text);
    font-weight: 500;
}

/* Footer */
footer {
    padding: 2.5rem 0 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted-2);
}

/* ============================================
   Project Pages
   ============================================ */

.project-header {
    padding: 8rem 0 3.25rem;
    position: relative;
}

.back-link {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 2rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.back-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.project-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 2.45rem);
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.1;
    margin-bottom: 0.35rem;
}

.project-header .tagline {
    font-family: var(--font-heading);
    letter-spacing: 0.02em;
    color: var(--muted);
    margin-bottom: 1.3rem;
}

.project-header .description {
    color: var(--text-secondary);
    max-width: 620px;
    padding: 0;
}

/* Demo sections */
.demo-section {
    padding: 2.85rem 0;
    margin: 0;
    border-top: 1px solid var(--border);
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.demo-section h2 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
    padding: 0;
    border-radius: 0;
    background: none;
    border: none;
}

.demo-item {
    margin-bottom: 3rem;
}

.demo-item:last-child {
    margin-bottom: 0;
}

.demo-item h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
}

.media-placeholder {
    background: var(--bg-secondary);
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    border: 1px dashed var(--border);
    overflow: hidden;
}

.media-placeholder video,
.media-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.demo-item .caption {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Gallery for VibraForge */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.gallery-item {
    background: var(--bg-secondary);
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.9rem;
    border-radius: var(--radius);
    border: 1px dashed var(--border);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item.wide {
    grid-column: span 2;
    aspect-ratio: 2 / 1;
}

/* Two column for VisionPro */
.two-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

/* Inline Links */
.inline-link {
    color: var(--accent);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.inline-link:hover {
    border-bottom-color: var(--accent);
}

/* PDF Viewer */
.pdf-viewer {
    width: 100%;
    height: 80vh;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-tertiary);
}

.pdf-viewer iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Dual PDF Viewer - Side by Side */
.pdf-dual-viewer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
    width: 100%;
}

.pdf-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.pdf-header h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.pdf-link {
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s;
}

.pdf-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.pdf-viewer-side {
    width: 100%;
    height: 75vh;
    min-height: 500px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    position: relative;
}

.pdf-viewer-side:hover {
    box-shadow: 0 8px 24px rgba(22, 27, 38, 0.12);
    transform: translateY(-2px);
}

.pdf-viewer-side embed,
.pdf-viewer-side iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* CV Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

.modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    height: 85vh;
    background: var(--panel);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-tertiary);
}

.modal-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-btn {
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--accent);
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-btn:hover {
    background: var(--accent);
    color: var(--panel);
}

.modal-close {
    font-size: 1.5rem;
    line-height: 1;
    color: var(--muted-2);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 0.25rem;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text);
}

.modal-content iframe {
    flex: 1;
    width: 100%;
    border: none;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        padding: 0.75rem 1.25rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    main {
        padding: 0 1.25rem 2.5rem;
    }
    
    .hero {
        padding: 6.75rem 0 2.35rem;
    }
    
    .hero-content {
        flex-direction: column;
        gap: 1.25rem;
        align-items: center;
        text-align: center;
        padding: 0;
    }
    
    .hero-photo {
        width: 120px;
        height: 120px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    section {
        padding: 2rem 0;
        scroll-margin-top: 7rem;
    }

    .latest-card {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.85rem;
    }

    .latest-media {
        max-width: min(100%, 340px);
    }

    .latest-photo,
    .latest-demo {
        min-height: 170px;
    }

    .latest-copy {
        padding: 0 0.1rem 0.15rem;
    }
    
    .entry {
        flex-direction: column;
        gap: 0.55rem;
        margin: 0 0 1rem;
        padding: 0.7rem;
        transform: none;
    }
    
    .entry-left {
        width: 40px;
    }

    .hackathon-logo-wrap {
        width: 116px;
        height: 34px;
        padding: 0.3rem 0.4rem;
    }
    
    .project-card {
        flex-direction: row;
        gap: 1rem;
        padding: 1rem;
    }

    .project-image {
        width: 60px;
        height: 60px;
    }

    .linkedin-topline {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }

    .linkedin-feed {
        grid-template-columns: 1fr;
    }

    .linkedin-card {
        min-height: auto;
    }

    .linkedin-card-top {
        flex-wrap: wrap;
    }
    
    .gallery,
    .two-col {
        grid-template-columns: 1fr;
    }
    
    .gallery-item.wide {
        grid-column: span 1;
        aspect-ratio: 4 / 3;
    }
    
    .modal-content {
        width: 95%;
        height: 80vh;
    }

    .pdf-dual-viewer {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .pdf-viewer-side {
        height: 60vh;
    }
}

/* ============================================
   Under Construction Modal
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(22, 27, 38, 0.85);
    backdrop-filter: blur(15px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(20px) saturate(180%);
    }
}

.modal-overlay .modal-content {
    background: transparent;
    padding: 2rem;
    border-radius: 0;
    max-width: 100%;
    width: 100%;
    height: 100%;
    margin: 0;
    text-align: center;
    box-shadow: none;
    border: none;
    animation: none;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.modal-overlay .modal-content::before {
    display: none;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes slideUp {
    from {
        transform: translateY(60px) scale(0.85) rotateX(10deg);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1) rotateX(0deg);
        opacity: 1;
    }
}

.modal-icon {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: auto;
    z-index: 1;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.construction-gif {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
}

@keyframes floatRotate {
    0%, 100% {
        transform: translateY(0px) rotate(-5deg);
    }
    25% {
        transform: translateY(-15px) rotate(5deg);
    }
    50% {
        transform: translateY(-8px) rotate(-3deg);
    }
    75% {
        transform: translateY(-15px) rotate(3deg);
    }
}

.modal-overlay .modal-content > h2,
.modal-overlay .modal-content > p,
.modal-overlay .modal-content > button {
    position: relative;
    z-index: 2;
}

.modal-overlay .modal-content h2 {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    color: white;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
    margin: 0;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.15;
}

.modal-overlay .modal-content p {
    font-size: 1.125rem;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    line-height: 1.7;
    margin: 0;
    font-family: var(--font-body);
    max-width: 600px;
    padding: 0 2rem;
}

.modal-btn {
    background: linear-gradient(135deg, #0f4c81 0%, #1e40af 100%);
    color: white;
    border: none;
    padding: 1.1rem 3rem;
    font-size: 1.05rem;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 24px rgba(15, 76, 129, 0.4),
        0 0 0 1px rgba(96, 165, 250, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    letter-spacing: 0.02em;
    display: inline-block;
    overflow: hidden;
    position: relative;
}

.modal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.3), rgba(59, 130, 246, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 15px 40px rgba(37, 99, 235, 0.5),
        0 0 0 1px rgba(96, 165, 250, 0.5),
        0 0 30px rgba(96, 165, 250, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.modal-btn:hover::before {
    opacity: 1;
}

.modal-btn:active {
    transform: translateY(-2px) scale(1);
    box-shadow:
        0 8px 20px rgba(37, 99, 235, 0.4),
        0 0 0 1px rgba(96, 165, 250, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

@media (max-width: 600px) {
    .modal-overlay .modal-content {
        padding: 3rem 2.5rem;
        border-radius: var(--radius);
    }

    .modal-icon {
        font-size: 4rem;
    }

    .modal-overlay .modal-content h2 {
        font-size: 1.85rem;
    }

    .modal-overlay .modal-content p {
        font-size: 1.05rem;
        margin-bottom: 2rem;
    }

    .modal-btn {
        padding: 1rem 2.5rem;
        font-size: 1rem;
    }
}
