/* ================================================================
   REDESIGN.CSS — Koskey Howard Portfolio
   Apple iOS / macOS Design Language
   ================================================================ */

/* ---------------------------------------------------------------
   1. DESIGN TOKENS — Apple System
   --------------------------------------------------------------- */
:root {
    /* Background layers (macOS dark mode) */
    --sys-bg:           #000000;
    --sys-elevated:     #1c1c1e;
    --sys-secondary-bg: #2c2c2e;
    --sys-tertiary-bg:  #3a3a3c;

    /* Vibrancy material */
    --material:         rgba(28, 28, 30, 0.82);
    --material-thin:    rgba(44, 44, 46, 0.72);

    /* Separators */
    --sep:              rgba(255, 255, 255, 0.1);
    --sep-strong:       rgba(255, 255, 255, 0.16);

    /* System accent — iOS dark mode blue only */
    --accent:           #0a84ff;
    --accent-hover:     #409cff;
    --accent-bg:        rgba(10, 132, 255, 0.12);

    /* Labels */
    --label-1:          #ffffff;
    --label-2:          rgba(255, 255, 255, 0.55);
    --label-3:          rgba(255, 255, 255, 0.3);
    --label-4:          rgba(255, 255, 255, 0.16);

    /* Radii — Apple HIG */
    --r-xs:   6px;
    --r-sm:   10px;
    --r-md:   14px;
    --r-lg:   20px;
    --r-xl:   28px;
    --r-full: 9999px;

    /* Shadows — subtle, not dramatic */
    --shadow-sm:  0 1px 4px rgba(0,0,0,0.45);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
    --shadow-lg:  0 12px 40px rgba(0,0,0,0.55);

    /* Motion — snappy like iOS */
    --ease:      cubic-bezier(0.4, 0, 0.2, 1);
    --spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
    --dur-fast:  150ms;
    --dur:       220ms;
    --dur-slow:  380ms;

    /* Font — system stack resolves to SF Pro on Apple devices */
    --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
            'Helvetica Neue', 'Inter', Arial, sans-serif;
}

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

html { scroll-behavior: smooth; overflow-x: clip; }

body {
    font-family: var(--font);
    background-color: var(--sys-bg);
    color: var(--label-1);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
}

/* ---------------------------------------------------------------
   3. TYPOGRAPHY
   --------------------------------------------------------------- */
.section-title {
    font-family: var(--font);
    font-size: clamp(1.9rem, 3.5vw, 2.6rem);
    font-weight: 700;
    color: var(--label-1);
    text-align: center;
    letter-spacing: -0.4px;
    line-height: 1.15;
    margin-bottom: 6px;
}

.section-title span {
    color: var(--accent);
    background: none;
    -webkit-text-fill-color: unset;
}

.section-title span::after { display: none; }

.section-subtitle {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
    opacity: 0.85;
}

.section-description {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 52px;
    color: var(--label-2);
    font-size: 0.95rem;
    line-height: 1.65;
}

.general-content {
    color: var(--label-2);
    font-size: 0.97rem;
    line-height: 1.7;
    margin-bottom: 14px;
}

/* ---------------------------------------------------------------
   4. BUTTONS
   --------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background-color: var(--accent);
    color: #fff;
    padding: 11px 24px;
    border-radius: var(--r-full);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: -0.1px;
    border: none;
    cursor: pointer;
    transition: background-color var(--dur) var(--ease),
                transform var(--dur-fast) var(--ease);
    position: relative;
    overflow: visible;
}

.btn::before { display: none; }

.btn:hover {
    background-color: var(--accent-hover);
    transform: none;
    box-shadow: none;
}

.btn:active {
    background-color: #0060d0;
    transform: scale(0.98);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    border-radius: var(--r-full);
    border: 1px solid var(--sep-strong);
    color: var(--label-1);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
    background: transparent;
    transition: background-color var(--dur) var(--ease),
                border-color var(--dur) var(--ease);
    backdrop-filter: none;
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--label-1);
    transform: none;
    box-shadow: none;
}

.btn-small {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: var(--r-full);
    background-color: var(--accent);
    color: #fff;
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color var(--dur) var(--ease);
}

.btn-small:hover {
    background-color: var(--accent-hover);
    transform: none;
    box-shadow: none;
    opacity: 1;
}

/* ---------------------------------------------------------------
   5. NAVIGATION
   --------------------------------------------------------------- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    height: 52px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--material);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-bottom: 0.5px solid var(--sep);
    transition: background var(--dur) var(--ease);
}

nav.scrolled {
    background: rgba(18, 18, 20, 0.94);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    box-shadow: none;
    padding: 0 32px;
}

nav.scrolled .logo,
nav.scrolled .nav-links a { color: var(--label-1); }

.logo {
    margin-left: 0;
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: var(--r-sm);
    background: none;
    backdrop-filter: none;
    box-shadow: none;
    transition: background var(--dur) var(--ease);
}

.logo a:hover {
    background: rgba(255,255,255,0.07);
    transform: none;
    box-shadow: none;
}

.logo a::before { display: none; }

.logo-img {
    height: 32px;
    width: auto;
    filter: none;
}

.logo a:hover .logo-img { filter: none; }

.dom-loaded .logo a { animation: none; }

.nav-links { margin-right: 0; }

.nav-links li { margin-left: 24px; }

.nav-links a {
    color: var(--label-2);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 4px 0;
    transition: color var(--dur-fast) var(--ease);
    letter-spacing: -0.1px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent);
    border-radius: 1px;
    transition: width var(--dur) var(--ease);
}

.nav-links a:hover,
.nav-links a.active { color: var(--label-1); }

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.hamburger span { background-color: var(--label-1); }

/* ---------------------------------------------------------------
   6. HERO
   --------------------------------------------------------------- */
header.parallax-header {
    background: var(--sys-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    animation: none;
}

header.parallax-header::before { display: none; }

/* Soft background — product page style bloom, not a mesh */
.hero-mesh-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 70% 50% at 50% -5%,
        rgba(255, 255, 255, 0.04) 0%,
        transparent 65%
    );
    pointer-events: none;
    z-index: 0;
}

.hero-grid-overlay { display: none; }

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    min-height: 100vh;
    padding: 116px 0 72px;
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-left {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.hero-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* ---- Availability badge ---- */
.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(48, 209, 88, 0.1);
    border: 0.5px solid rgba(48, 209, 88, 0.28);
    color: #30d158;
    padding: 5px 14px 5px 10px;
    border-radius: var(--r-full);
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.1px;
    margin-bottom: 14px;
    width: fit-content;
}

.avail-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #30d158;
    flex-shrink: 0;
    animation: avail-pulse 2.2s ease-in-out infinite;
}

@keyframes avail-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.5); }
    50%       { box-shadow: 0 0 0 5px rgba(48, 209, 88, 0); }
}

/* ---- Scroll progress bar ---- */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    z-index: 9999;
    transition: width 0.08s linear;
    pointer-events: none;
}

.hero-greeting {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

.hero-name {
    font-family: var(--font);
    font-size: clamp(2.6rem, 5.5vw, 4.4rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -1.5px;
    color: var(--label-1);
    margin-bottom: 10px;
}

.hero-name span {
    color: var(--label-1);
    background: none;
    -webkit-text-fill-color: unset;
}

.hero-role-wrapper {
    display: inline-flex;
    margin-bottom: 16px;
}

.hero-role {
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--label-2);
    letter-spacing: -0.2px;
    padding: 0;
    border: none;
    background: none;
    backdrop-filter: none;
}

.hero-bio {
    font-size: 0.98rem;
    color: var(--label-2);
    line-height: 1.7;
    max-width: 460px;
}

.hero-stats {
    display: flex;
    gap: 0;
    border: 0.5px solid var(--sep-strong);
    border-radius: var(--r-lg);
    overflow: hidden;
    width: fit-content;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 16px 24px;
    background: var(--sys-elevated);
    border: none;
    border-right: 0.5px solid var(--sep);
    transition: background var(--dur) var(--ease);
}

.hero-stat:last-child { border-right: none; }

.hero-stat:hover {
    background: var(--sys-secondary-bg);
    border-color: var(--sep);
}

.stat-num {
    font-family: var(--font);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--label-1);
    letter-spacing: -0.5px;
    line-height: 1;
    background: none;
    -webkit-text-fill-color: unset;
    -webkit-background-clip: unset;
    background-clip: unset;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--label-3);
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Code editor — Xcode dark theme */
.code-editor {
    background: #1e1e1e;
    border: 0.5px solid var(--sep-strong);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 100%;
    transform: none;
    transition: box-shadow var(--dur-slow) var(--ease);
}

.code-editor:hover {
    box-shadow: 0 20px 60px rgba(0,0,0,0.65);
    transform: none;
}

.code-editor-header {
    background: #2d2d2d;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 7px;
    border-bottom: 0.5px solid rgba(255,255,255,0.06);
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

.editor-title {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
    margin-left: auto;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
}

.code-editor-body {
    padding: 18px 20px;
    display: flex;
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.line-numbers {
    display: flex;
    flex-direction: column;
    gap: 1px;
    color: rgba(255,255,255,0.2);
    font-size: 0.76rem;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    user-select: none;
    text-align: right;
}

.code-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
}

.code-line {
    font-size: 0.8rem;
    line-height: 1.6;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    white-space: nowrap;
}

/* Xcode syntax colors */
.code-keyword  { color: #fc5fa3; }
.code-class    { color: #5dd8ff; }
.code-property { color: #67b7a4; }
.code-string   { color: #fc6a5d; }
.code-comment  { color: #6c7986; font-style: italic; }
.code-function { color: #a167e6; }

/* Vector icons — toned down */
.vector-elements {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

.vector-icon {
    color: rgba(255,255,255,0.08) !important;
    font-size: 1.6rem;
}

.icon-tooltip {
    background: var(--sys-elevated);
    color: var(--label-2);
    border: 0.5px solid var(--sep);
    font-size: 0.73rem;
    padding: 3px 8px;
    border-radius: var(--r-xs);
}

.hero-shapes { display: none; }

.scroll-indicator { z-index: 5; }
.mouse { border-color: var(--sep-strong) !important; }
.mouse .wheel { background: var(--label-3) !important; }
.arrow span { border-color: var(--sep-strong) !important; }

/* ---------------------------------------------------------------
   7. ABOUT
   --------------------------------------------------------------- */
#about {
    background: var(--sys-elevated);
    padding: 96px 0;
    position: relative;
}

#about::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 0.5px;
    background: var(--sep);
}

.about-content {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 72px;
    align-items: start;
    margin-top: 2rem;
}

.about-img { position: relative; }

.about-img img {
    width: 100%;
    border-radius: var(--r-xl);
    border: 0.5px solid var(--sep-strong);
    box-shadow: var(--shadow-lg);
    display: block;
}

.experience-badge {
    position: absolute;
    bottom: -16px;
    right: -16px;
    background: var(--accent);
    border-radius: var(--r-md);
    padding: 14px 18px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.experience-badge .years {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    letter-spacing: -1px;
}

.experience-badge .text {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.about-text .section-subtitle { text-align: left; }

.skills { margin-top: 20px; }

.skills h3 {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--label-3);
    margin-bottom: 12px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tags span {
    padding: 5px 14px;
    border-radius: var(--r-full);
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--sys-secondary-bg);
    border: 0.5px solid var(--sep);
    color: var(--label-2);
    transition: background var(--dur) var(--ease),
                color var(--dur) var(--ease);
    cursor: default;
}

.skill-tags span:hover {
    background: var(--sys-tertiary-bg);
    color: var(--label-1);
}

.skill-tags span.featured {
    background: var(--accent-bg);
    border-color: rgba(10, 132, 255, 0.3);
    color: var(--accent-hover);
    font-weight: 600;
}

.skill-tags span.featured:hover {
    background: rgba(10, 132, 255, 0.2);
    color: #fff;
    box-shadow: none;
}

.resume-btn-container { margin-top: 22px; }

.career-highlights li,
.business-benefits li,
.tech-approach li {
    color: var(--label-2);
    font-size: 0.9rem;
    padding: 3px 0 3px 16px;
    position: relative;
}

.career-highlights li::before,
.business-benefits li::before,
.tech-approach li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* ---------------------------------------------------------------
   8. EXPERIENCE TIMELINE
   --------------------------------------------------------------- */
.experience {
    background: var(--sys-bg);
    padding: 96px 0;
    position: relative;
}

.experience::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 0.5px;
    background: var(--sep);
}

.timeline { max-width: 860px; margin: 2rem auto 0; }

.timeline::before {
    background: var(--sep-strong);
    width: 1px;
    left: 20px;
    opacity: 1;
}

.timeline-dot {
    width: 40px;
    height: 40px;
    background: var(--sys-elevated);
    border: 0.5px solid var(--sep-strong);
    box-shadow: none;
    flex-shrink: 0;
    margin-top: 2px;
    z-index: 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-dot::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
}

.timeline-content {
    background: var(--sys-elevated);
    border: 0.5px solid var(--sep);
    border-left: none;
    border-radius: var(--r-lg);
    padding: 22px 26px;
    box-shadow: var(--shadow-sm);
    transition: background var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease);
}

.timeline-content:hover {
    background: var(--sys-secondary-bg);
    box-shadow: var(--shadow-md);
    transform: none;
    border-color: var(--sep-strong);
    border-left: none;
}

.timeline-header h3 {
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    color: var(--label-1);
    letter-spacing: -0.2px;
}

.timeline-company {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
}

.timeline-date, .timeline-location {
    color: var(--label-3);
    font-size: 0.8rem;
}

.timeline-date i, .timeline-location i { color: var(--label-3); }

.timeline-list li {
    color: var(--label-2);
    font-size: 0.88rem;
    line-height: 1.6;
}

.timeline-list li::before {
    content: '–';
    color: var(--label-3);
    font-size: 0.85rem;
    top: 0;
}

/* ---------------------------------------------------------------
   9. SERVICES
   --------------------------------------------------------------- */
#services {
    background: var(--sys-elevated);
    padding: 96px 0;
    position: relative;
}

#services::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 0.5px;
    background: var(--sep);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
    gap: 16px;
}

.service-card {
    background: var(--sys-secondary-bg);
    border: 0.5px solid var(--sep);
    border-radius: var(--r-lg);
    padding: 24px 22px;
    transition: background var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease);
    position: relative;
    overflow: hidden;
}

.service-card::before { display: none; }

.service-card:hover {
    background: var(--sys-tertiary-bg);
    border-color: var(--sep-strong);
    box-shadow: var(--shadow-md);
    transform: none;
}

.service-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.service-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.service-header i {
    width: 40px;
    height: 40px;
    border-radius: var(--r-sm);
    background: var(--accent-bg);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: none;
    flex-shrink: 0;
}

.service-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--label-1);
    letter-spacing: -0.2px;
}

.service-card > p {
    color: var(--label-2);
    font-size: 0.86rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Service details — always visible */
.service-details {
    display: block;
    padding-top: 14px;
    margin-top: 12px;
    border-top: 0.5px solid var(--sep);
}

.service-details h4 {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--label-3);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.service-details ul li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.84rem;
    color: var(--label-2);
    padding: 4px 0;
}

.service-details ul li i {
    color: var(--accent);
    font-size: 0.7rem;
    margin-top: 5px;
    flex-shrink: 0;
}

/* ---------------------------------------------------------------
   10. PROJECTS
   --------------------------------------------------------------- */
#projects {
    background: var(--sys-bg);
    padding: 96px 0;
    position: relative;
}

#projects::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 0.5px;
    background: var(--sep);
}

.projects-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
}

.projects-filter .btn-small {
    background: var(--sys-elevated);
    color: var(--label-2);
    border: 0.5px solid var(--sep);
    padding: 6px 16px;
    border-radius: var(--r-full);
    font-weight: 500;
    font-size: 0.8rem;
}

.projects-filter .btn-small.active,
.projects-filter .btn-small:hover {
    background: var(--accent);
    color: #fff;
    border-color: transparent;
    box-shadow: none;
}

/* Filter hide — use a dedicated class to avoid specificity fights */
.projects-grid .project-card.pf-hidden {
    display: none !important;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.project-card {
    background: var(--sys-elevated);
    border: 0.5px solid var(--sep);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: box-shadow var(--dur) var(--ease),
                border-color var(--dur) var(--ease);
    display: flex;
    flex-direction: column;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: none !important; /* reset translateY+scale hover from styles.css */
}

.project-card::after { display: none; } /* remove gradient overlay from styles.css */

.project-card:hover {
    border-color: var(--sep-strong);
    box-shadow: var(--shadow-md);
    transform: none;
}

.project-img {
    height: 196px;
    overflow: hidden;
    position: relative;
}

.project-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.5));
    pointer-events: none;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--dur-slow) var(--ease);
    filter: brightness(0.9);
}

.project-card:hover .project-img img {
    transform: scale(1.04);
    filter: brightness(0.95);
}

.project-info {
    padding: 18px 18px 16px;   /* overrides padding-bottom:80px from styles.css */
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    height: auto;              /* reset height:100% from styles.css */
}

.project-info h3 {
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--label-1);
    letter-spacing: -0.2px;
    line-height: 1.35;
}

.project-info > p {
    color: var(--label-2);
    font-size: 0.84rem;
    line-height: 1.6;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    line-clamp: 4;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-tags span {
    padding: 3px 10px;
    border-radius: var(--r-full);
    font-size: 0.73rem;
    font-weight: 500;
    background: var(--sys-secondary-bg);
    border: 0.5px solid var(--sep);
    color: var(--label-3);
}

.project-tags span[data-tech="true"] {
    background: var(--accent-bg);
    border-color: rgba(10,132,255,0.25);
    color: var(--accent-hover);
}

.project-actions {
    position: static;          /* reset position:absolute from styles.css */
    bottom: unset;
    left: unset;
    right: unset;
    width: auto;
    display: flex;
    flex-direction: row;       /* override column from styles.css */
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 12px;
    margin-top: auto;
    border-top: 0.5px solid var(--sep);
}

.project-date {
    font-size: 0.76rem;
    color: var(--label-3);
    font-weight: 500;
    flex-shrink: 0;
    white-space: nowrap;
}

.personal-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    background: var(--accent-bg);
    color: var(--accent-hover);
    border: 0.5px solid rgba(10,132,255,0.25);
    padding: 2px 8px;
    border-radius: var(--r-full);
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.2px;
}

.bg-shapes { display: none; }

/* ---------------------------------------------------------------
   11. EDUCATION & CREDENTIALS
   --------------------------------------------------------------- */
.education {
    background: var(--sys-elevated);
    padding: 96px 0;
    position: relative;
}

.education::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 0.5px;
    background: var(--sep);
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 2rem;
}

.edu-card {
    background: var(--sys-secondary-bg);
    border: 0.5px solid var(--sep);
    border-radius: var(--r-lg);
    padding: 24px 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: background var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease);
    position: relative;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.edu-card::before { display: none; }

.edu-card:hover {
    background: var(--sys-tertiary-bg);
    box-shadow: var(--shadow-md);
    transform: none;
    border-color: var(--sep-strong);
}

.edu-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--r-sm);
    background: var(--accent-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: none;
}

.edu-icon i {
    color: var(--accent);
    font-size: 1.1rem;
}

.edu-body h3 a {
    color: inherit;
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease);
}

.edu-body h3 a:hover { color: var(--accent); }

.edu-body h3 {
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--label-1);
    margin-bottom: 5px;
    letter-spacing: -0.2px;
    line-height: 1.35;
}

.edu-date {
    background: var(--accent-bg);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: var(--r-full);
    margin-bottom: 7px;
    display: inline-block;
    letter-spacing: 0.2px;
}

.edu-body p {
    color: var(--label-2);
    font-size: 0.84rem;
    line-height: 1.5;
}

.lang-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.lang-tag {
    background: var(--sys-tertiary-bg);
    color: var(--label-2);
    border: 0.5px solid var(--sep-strong);
    padding: 4px 14px;
    border-radius: var(--r-full);
    font-size: 0.8rem;
    font-weight: 500;
}

/* ---------------------------------------------------------------
   12. TESTIMONIALS — Bento Grid
   --------------------------------------------------------------- */
#testimonials {
    background: var(--sys-bg);
    padding: 96px 0;
    position: relative;
}

#testimonials::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 0.5px;
    background: var(--sep);
}

/* Bento grid: diagonal pattern — wide | narrow / narrow | wide */
.testimonials-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    gap: 12px;
    margin-top: 2.5rem;
}

.t-card {
    background: var(--sys-elevated);
    border: 0.5px solid var(--sep);
    border-radius: var(--r-xl);
    padding: 32px 30px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: background var(--dur) var(--ease),
                border-color var(--dur) var(--ease);
    position: relative;
    overflow: hidden;
}

/* Diagonal layout: card 1 wide left, card 2 narrow right,
   card 3 narrow left, card 4 wide right */
.t-card:nth-child(1) { grid-column: 1; grid-row: 1; }
.t-card:nth-child(2) { grid-column: 2; grid-row: 1; }
.t-card:nth-child(3) { grid-column: 1; grid-row: 2; }
.t-card:nth-child(4) { grid-column: 2; grid-row: 2; }

.t-card--wide {
    background: var(--sys-secondary-bg);
}

.t-card:hover {
    background: var(--sys-secondary-bg);
    border-color: var(--sep-strong);
}

.t-card--wide:hover {
    background: var(--sys-tertiary-bg);
}

/* Large decorative quote mark — typographic, not an icon */
.t-card::before {
    content: '\201C';
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 5.5rem;
    line-height: 1;
    color: var(--label-4);
    font-family: Georgia, 'Times New Roman', serif;
    pointer-events: none;
    user-select: none;
}

/* Star rating */
.t-stars {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: #ff9f0a;
    line-height: 1;
}

/* Quote text */
.t-card blockquote {
    font-size: 0.97rem;
    line-height: 1.72;
    color: var(--label-2);
    font-style: italic;
    flex: 1;
    border: none;
    padding: 0;
    margin: 0;
    quotes: none;
}

.t-card--wide blockquote {
    font-size: 1.02rem;
}

/* Author row */
.t-author {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 0.5px solid var(--sep);
    margin-top: auto;
}

/* Initials avatar — uses CSS custom properties set inline */
.t-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--r-sm);
    background: var(--av-bg, rgba(10,132,255,0.12));
    color: var(--av-color, var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.t-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.t-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--label-1);
    letter-spacing: -0.1px;
}

.t-role {
    font-size: 0.77rem;
    color: var(--label-3);
    font-weight: 400;
}

.slider-dot.active {
    background: var(--accent);
    width: 20px;
    border-radius: 3px;
    box-shadow: none;
}

/* ---------------------------------------------------------------
   13. CONTACT
   --------------------------------------------------------------- */
#contact {
    background: var(--sys-elevated);
    padding: 96px 0;
    position: relative;
}

#contact::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 0.5px;
    background: var(--sep);
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}

.contact-card {
    background: var(--sys-secondary-bg);
    border: 0.5px solid var(--sep);
    border-radius: var(--r-lg);
    padding: 28px 22px;
    text-align: center;
    transition: background var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.contact-card:hover {
    background: var(--sys-tertiary-bg);
    border-color: var(--sep-strong);
    box-shadow: var(--shadow-md);
    transform: none;
}

.contact-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--r-md);
    background: var(--accent-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.2rem;
    color: var(--accent);
    box-shadow: none;
}

/* ---- Copy email button ---- */
.contact-card p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.copy-btn {
    background: none;
    border: 0.5px solid var(--sep-strong);
    border-radius: var(--r-sm);
    color: var(--label-3);
    cursor: pointer;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    transition: background var(--dur-fast) var(--ease),
                color var(--dur-fast) var(--ease),
                border-color var(--dur-fast) var(--ease);
    flex-shrink: 0;
}

.copy-btn:hover {
    background: var(--accent-bg);
    border-color: var(--accent);
    color: var(--accent);
}

.copy-btn.copied {
    background: rgba(48, 209, 88, 0.12);
    border-color: rgba(48, 209, 88, 0.35);
    color: #30d158;
}

.contact-card h3 {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--label-3);
    margin-bottom: 6px;
}

.contact-card p,
.contact-card p a {
    color: var(--label-2);
    font-size: 0.92rem;
    transition: color var(--dur-fast) var(--ease);
}

.contact-card:hover p a,
.contact-card p a:hover { color: var(--accent); }

.social-container { text-align: center; }

.social-container h3 {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--label-3);
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--r-full);
    background: var(--sys-secondary-bg);
    border: 0.5px solid var(--sep);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--label-2);
    transition: background var(--dur) var(--ease),
                color var(--dur) var(--ease),
                border-color var(--dur) var(--ease);
    backdrop-filter: none;
}

.social-link:hover {
    background: var(--sys-tertiary-bg);
    border-color: var(--sep-strong);
    color: var(--label-1);
    transform: none;
    box-shadow: none;
}

.social-link i {
    font-size: 0.95rem;
    color: var(--accent);
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

/* ---------------------------------------------------------------
   14. FOOTER
   --------------------------------------------------------------- */
footer {
    background: var(--sys-secondary-bg);
    border-top: 0.5px solid var(--sep-strong);
    padding: 56px 0 28px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1.4fr;
    gap: 48px;
    margin-bottom: 40px;
}

/* Brand column */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo-img {
    height: 34px;
    filter: brightness(1);
}

.footer-tagline h3 {
    font-size: 0.97rem;
    font-weight: 600;
    color: var(--label-1);
    letter-spacing: -0.2px;
}

.footer-tagline p {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    background: none;
    -webkit-text-fill-color: unset;
    -webkit-background-clip: unset;
    background-clip: unset;
}

.footer-bio {
    font-size: 0.83rem;
    color: var(--label-2);
    line-height: 1.65;
    max-width: 300px;
}

.footer-avail {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.76rem;
    font-weight: 500;
    color: #30d158;
    width: fit-content;
}

/* Nav column */
.footer-col-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--label-1);
    margin-bottom: 14px;
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav a {
    font-size: 0.86rem;
    color: var(--label-2);
    font-weight: 400;
    transition: color var(--dur-fast) var(--ease);
}

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

/* Contact column */
.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.footer-contact-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.84rem;
    color: var(--label-2);
}

.footer-contact-list li i {
    color: var(--accent);
    font-size: 0.8rem;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}

.footer-contact-list a {
    color: var(--label-2);
    transition: color var(--dur-fast) var(--ease);
}

.footer-contact-list a:hover { color: var(--accent); }

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 34px;
    height: 34px;
    border-radius: var(--r-sm);
    background: var(--sys-tertiary-bg);
    border: 0.5px solid var(--sep-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--label-2);
    font-size: 0.85rem;
    transition: background var(--dur-fast) var(--ease),
                color var(--dur-fast) var(--ease),
                border-color var(--dur-fast) var(--ease);
}

.footer-social a:hover {
    background: var(--accent-bg);
    border-color: var(--accent);
    color: var(--accent);
}

/* Footer bottom bar */
.footer-bottom {
    padding-top: 24px;
    border-top: 0.5px solid var(--sep);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--label-3);
}

.footer-credit {
    font-size: 0.78rem;
    color: var(--label-3);
}

/* ---------------------------------------------------------------
   15. MOBILE NAV
   --------------------------------------------------------------- */
.nav-links.active {
    background: rgba(18, 18, 20, 0.96) !important;
    border-bottom: 0.5px solid var(--sep);
}

.nav-links.active a {
    color: var(--label-2) !important;
    border-bottom: 0.5px solid var(--sep);
}

.nav-links.active a:hover {
    color: var(--label-1) !important;
    background: rgba(255,255,255,0.05);
}

.hamburger span {
    background-color: var(--label-1) !important;
}

/* ---------------------------------------------------------------
   16. RESPONSIVE
   --------------------------------------------------------------- */

/* ── Tablet landscape (≤1024px) ───────────────────────────────── */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 100px 0 64px;
        gap: 40px;
    }

    .hero-right { justify-content: center; }
    .hero-bio { max-width: 100%; }

    .code-editor { max-width: 100%; transform: none; }

    .about-content { grid-template-columns: 1fr; gap: 40px; }
    .about-img { max-width: 360px; margin: 0 auto; }

    /* 2-col grids at tablet */
    .education-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-cards  { grid-template-columns: repeat(2, 1fr); }
}

/* ── Tablet portrait / large phone (≤768px) ───────────────────── */
@media (max-width: 768px) {
    .container { padding: 0 20px; }

    /* Tighten section vertical rhythm on mobile */
    #about, .experience, #services, #projects,
    .education, #testimonials, #contact { padding: 64px 0; }

    /* Hero */
    .hero { padding: 96px 0 52px; gap: 32px; }
    .hero-name { font-size: clamp(2rem, 9vw, 3rem); }
    .hero-bio  { font-size: 0.92rem; max-width: 100%; }

    .hero-stats { width: 100%; border-radius: var(--r-md); }
    .hero-stat  { padding: 12px 14px; flex: 1; min-width: 0; }
    .stat-num   { font-size: 1.2rem; }
    .stat-label { font-size: 0.65rem; }

    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons .btn,
    .hero-buttons .btn-outline { width: 100%; justify-content: center; }

    /* Hero — remove double 100vh, hide decorative code editor on mobile */
    header.parallax-header { align-items: flex-start; }
    .hero { min-height: unset; }
    .hero-right { display: none; }
    .hero-left { gap: 20px; }

    /* About */
    .about-text .section-subtitle { text-align: center; }
    .about-img { max-width: 300px; }

    /* Single-column layouts */
    .services-grid  { grid-template-columns: 1fr; }
    .projects-grid  { grid-template-columns: 1fr; }
    .education-grid { grid-template-columns: 1fr; }
    /* Contact cards — flex column so align-items:center actually works */
    .contact-cards {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    .contact-card {
        width: 100%;
        max-width: 360px;
        padding: 18px 16px;
        text-align: center;
    }
    .contact-card .contact-icon {
        width: 44px;
        height: 44px;
        font-size: 1rem;
        margin: 0 auto 10px;
    }
    .contact-card h3 { margin-bottom: 4px; }
    .contact-card p  { justify-content: center; }

    /* Timeline */
    .timeline-item    { gap: 12px; }
    .timeline-dot     { width: 32px; height: 32px; }
    .timeline-content { padding: 16px 14px; }
    .timeline-meta    { flex-direction: column; gap: 4px; }

    /* Testimonials bento → single column */
    .testimonials-grid { grid-template-columns: 1fr; grid-template-rows: unset; }
    .t-card:nth-child(1),
    .t-card:nth-child(2),
    .t-card:nth-child(3),
    .t-card:nth-child(4) { grid-column: 1; grid-row: unset; }

    /* Footer */
    .footer-content  { grid-template-columns: 1fr; gap: 28px; text-align: center; }
    .footer-brand    { align-items: center; }
    .footer-bio      { max-width: 100%; }
    .footer-avail    { margin: 0 auto; }
    .footer-nav ul   { align-items: center; }
    .footer-contact-list li { justify-content: center; }
    .footer-social   { justify-content: center; }
    .footer-bottom   { flex-direction: column; gap: 6px; text-align: center; }

    /* Mobile nav drawer — dark theme override */
    .nav-links {
        background: rgba(18, 18, 20, 0.97) !important;
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        border-left: 0.5px solid var(--sep-strong);
    }
    .nav-links li { border-bottom: 0.5px solid var(--sep) !important; }
    .nav-links a  { color: var(--label-2) !important; font-size: 1rem !important; }
    .nav-links a:hover { color: var(--label-1) !important; }

    nav { padding: 0 20px; }
}

/* ── Small phone (≤480px) ─────────────────────────────────────── */
@media (max-width: 480px) {
    .container { padding: 0 16px; }

    #about, .experience, #services, #projects,
    .education, #testimonials, #contact { padding: 52px 0; }

    .hero { padding: 88px 0 44px; }
    .section-title { font-size: 1.7rem; }

    /* Stats — horizontal row with icon+number pairs still readable */
    .hero-stats { flex-direction: column; width: 100%; }
    .hero-stat {
        border-right: none !important;
        border-bottom: 0.5px solid var(--sep);
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
    }
    .hero-stat:last-child { border-bottom: none; }
    .stat-num { font-size: 1.3rem; }

    /* Code editor — kill the scale() hack from styles.css, use proper sizing */
    .code-editor {
        transform: none !important;
        margin-left: 0 !important;
        font-size: 0.72rem;
    }
    .code-line { font-size: 0.72rem; }

    /* Project cards */
    .project-img  { height: 160px; }
    .project-info { padding: 14px 14px 12px; }

    /* Edu cards — stack icon above text */
    .edu-card  { flex-direction: column; gap: 10px; }
    .edu-icon  { width: 42px; height: 42px; }

    /* Experience badge */
    .experience-badge       { bottom: -10px; right: -8px; padding: 10px 14px; }
    .experience-badge .years { font-size: 1.6rem; }

    /* Timeline */
    .timeline::before { left: 12px !important; }
    .timeline-dot     { width: 28px; height: 28px; }
    .timeline-item    { gap: 10px; }
    .timeline-content { padding: 14px 12px; }

    /* Social links — proper equal-size circles (asymmetric padding makes ovals) */
    .social-link span { display: none; }
    .social-link {
        width: 46px;
        height: 46px;
        padding: 0;
        justify-content: center;
        flex-shrink: 0;
        border-radius: 50%;
    }

    /* Cards */
    .contact-card { padding: 22px 16px; }
    .service-card { padding: 20px 16px; }

    nav { padding: 0 16px; }
}

/* ── Very small — budget Androids, SE 1st gen (≤360px) ──────── */
@media (max-width: 360px) {
    .container  { padding: 0 12px; }
    .hero-name  { font-size: 1.7rem; letter-spacing: -1px; }
    .hero-bio   { font-size: 0.85rem; }
    .section-title { font-size: 1.5rem; }
    .stat-num   { font-size: 1.1rem; }
    nav         { padding: 0 14px; }
}
