/* =========================================================
   PREMIUM DARK THEME & ANIMATIONS
   AI Engineer Portfolio — Lamis GHOUALMI
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400&display=swap');

/* ---- DARK THEME BASE ---- */

body {
    background: #060b14 !important;
    color: #c9d1d9 !important;
}

/* ---- SIDEBAR ---- */

#header {
    background: rgba(6,11,20,0.72) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    box-shadow: inset -1px 0 0 rgba(0,212,255,0.12), 2px 0 24px rgba(0,0,0,0.4) !important;
    border-right: 1px solid rgba(0,212,255,0.1) !important;
}

#logo h1 {
    background: linear-gradient(135deg, #00d4ff 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700 !important;
    font-size: 0.88em !important;
    letter-spacing: 0.02em;
}

#logo p {
    color: rgba(0,212,255,0.65) !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 0.46em !important;
    letter-spacing: 0.04em;
}

#nav ul li a {
    color: rgba(201,209,217,0.45) !important;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease !important;
    border-radius: 4px;
    margin: 2px 8px;
}

#nav ul li a:hover {
    color: #00d4ff !important;
    background: rgba(0,212,255,0.07) !important;
    transform: translateX(-3px);
}

#nav ul li a.active {
    background: rgba(0,212,255,0.1) !important;
    color: #00d4ff !important;
    box-shadow: inset 0 0 0 1px rgba(0,212,255,0.18) !important;
}

#nav ul li a.active span:before {
    color: #00d4ff !important;
}

#header .icons a {
    color: rgba(201,209,217,0.35) !important;
    transition: color 0.3s ease, transform 0.3s ease, text-shadow 0.3s ease !important;
    font-size: 1.3em;
}

#header .icons a:hover {
    color: #00d4ff !important;
    text-shadow: 0 0 14px rgba(0,212,255,0.8);
    transform: translateY(-3px);
}

/* ---- SECTION-LOCAL PARTICLE CANVASES ---- */

.section-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
}

/* ---- SECTION BACKGROUNDS ---- */

#main > section {
    background-image: none !important;
}

#main > section.one {
    background: linear-gradient(135deg, #060b14 0%, #0a0e1c 60%, #060b14 100%) !important;
    position: relative;
    overflow: hidden;
}

#main > section.two {
    background: linear-gradient(180deg, #0d1117 0%, #0a0f1a 100%) !important;
}

#main > section.three {
    background: linear-gradient(180deg, #0a0f1a 0%, #0d1117 100%) !important;
}

#main > section.four {
    background: linear-gradient(180deg, #080d15 0%, #0a0e17 100%) !important;
}

/* ---- TEXT COLORS ---- */

h1, h2, h3, h4, h5, h6 {
    color: #e6edf3 !important;
}

h2.alt {
    color: #e6edf3 !important;
}

p {
    color: #8b949e;
}

strong, b {
    color: #c9d1d9 !important;
}

em {
    color: #a855f7;
    font-style: italic;
}

a {
    color: rgba(0,212,255,0.8) !important;
    border-bottom-color: rgba(0,212,255,0.2) !important;
    transition: color 0.25s ease, border-color 0.25s ease !important;
}

a:hover {
    color: #00d4ff !important;
    border-bottom-color: transparent !important;
}

/* ---- SECTION HEADING GRADIENT ---- */

#about header h2,
#skills header h2,
#experience header h2,
#portfolio header h2,
#contact header h2 {
    background: linear-gradient(135deg, #00d4ff 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600 !important;
    display: inline-block;
    position: relative;
}

#about header h2::after,
#skills header h2::after,
#experience header h2::after,
#portfolio header h2::after,
#contact header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(135deg, #00d4ff, #a855f7);
    border-radius: 2px;
}

/* =========================================================
   PARTICLES CANVAS
   ========================================================= */

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.75;
}

#main {
    position: relative;
    z-index: 1;
}

/* =========================================================
   GEOMETRIC GRID OVERLAY — ALL SECTIONS
   ========================================================= */

/* All sections get the grid */
#main > section {
    position: relative !important;
}

#main > section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(0,212,255,0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,212,255,0.055) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}

/* Intro grid slightly brighter */
#top::before {
    background-image:
        linear-gradient(rgba(0,212,255,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,212,255,0.07) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* All section containers float above the grid */
#main > section .container {
    position: relative;
    z-index: 1;
}

/* ---- ANIMATED CIRCLES IN INTRO ---- */

.geo-shapes {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.geo-shape {
    position: absolute;
    border-radius: 50%;
    animation: geo-spin linear infinite;
}

.geo-shape:nth-child(1) {
    width: 420px; height: 420px;
    top: -140px; right: 8%;
    border: 1px solid rgba(0,212,255,0.05);
    animation-duration: 35s;
}

.geo-shape:nth-child(2) {
    width: 260px; height: 260px;
    bottom: 5%; right: 22%;
    border: 1px solid rgba(168,85,247,0.06);
    animation-duration: 22s;
    animation-direction: reverse;
}

.geo-shape:nth-child(3) {
    width: 160px; height: 160px;
    top: 25%; right: 4%;
    border: 1px solid rgba(0,212,255,0.04);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation-duration: 28s;
}

@keyframes geo-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* =========================================================
   INTRO — NAME SLIDE-IN + TYPEWRITER
   ========================================================= */

#top .container {
    position: relative;
    z-index: 2;
}

#intro-headline {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1),
                transform 0.9s cubic-bezier(0.16,1,0.3,1);
    font-size: 2.6em !important;
    font-weight: 700 !important;
    color: #fff !important;
    text-shadow: 0 0 40px rgba(0,212,255,0.2);
    letter-spacing: -0.5px;
}

#intro-headline.visible {
    opacity: 1;
    transform: translateX(0);
}

#typewriter-text {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 0.72em !important;
    color: rgba(0,212,255,0.82) !important;
    line-height: 2em !important;
    min-height: 5em;
    letter-spacing: 0.01em;
}

.tw-cursor {
    display: inline-block;
    width: 2px;
    height: 0.9em;
    background: #00d4ff;
    margin-left: 2px;
    vertical-align: middle;
    animation: tw-blink 0.75s step-end infinite;
    box-shadow: 0 0 8px rgba(0,212,255,0.8);
}

@keyframes tw-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ---- PORTFOLIO BUTTON ---- */

#top .button {
    background: transparent !important;
    border: 1px solid rgba(0,212,255,0.4) !important;
    color: #00d4ff !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 0.65em !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase;
    padding: 0.9em 2.8em !important;
    border-radius: 3px !important;
    border-bottom: 1px solid rgba(0,212,255,0.4) !important;
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
}

#top .button::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,212,255,0.08), transparent);
    transition: left 0.45s ease;
}

#top .button:hover::before { left: 100%; }

#top .button:hover {
    background: rgba(0,212,255,0.08) !important;
    border-color: #00d4ff !important;
    box-shadow: 0 0 24px rgba(0,212,255,0.25), inset 0 0 20px rgba(0,212,255,0.04) !important;
    transform: translateY(-2px);
    color: #fff !important;
}

/* =========================================================
   FADE-IN SECTIONS ON SCROLL
   ========================================================= */

.fade-in-section {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.75s ease, transform 0.75s ease;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================
   ABOUT ME
   ========================================================= */

#about p {
    text-align: left;
    color: #8b949e;
    line-height: 1.9em;
    font-size: 0.84em;
    max-width: 820px;
    margin: 0 auto 1.5em;
}

#about p strong {
    color: #00d4ff !important;
}

#about p em {
    color: #a855f7;
}

/* =========================================================
   SKILLS BADGES
   ========================================================= */

#skills {
    padding: 4em 0 !important;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7em;
    justify-content: center;
    margin-top: 1.8em;
}

.skill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    padding: 0.45em 1.05em;
    border-radius: 100px;
    font-size: 0.58em;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.04em;
    opacity: 0;
    transform: scale(0.55);
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
                opacity 0.35s ease,
                background 0.25s ease,
                box-shadow 0.25s ease;
    cursor: default;
    border-bottom: none !important;
    text-decoration: none !important;
}

.skill-badge.bounced-in {
    opacity: 1;
    transform: scale(1);
}

/* Cyan (default) */
.skill-badge {
    background: rgba(0,212,255,0.05);
    border: 1px solid rgba(0,212,255,0.18);
    color: #00d4ff !important;
}

.skill-badge:hover {
    background: rgba(0,212,255,0.1) !important;
    border-color: rgba(0,212,255,0.5) !important;
    box-shadow: 0 0 16px rgba(0,212,255,0.18);
    transform: scale(1.07) translateY(-2px) !important;
    color: #fff !important;
}

/* Purple */
.skill-badge.purple {
    background: rgba(168,85,247,0.05);
    border-color: rgba(168,85,247,0.18);
    color: #a855f7 !important;
}

.skill-badge.purple:hover {
    background: rgba(168,85,247,0.1) !important;
    border-color: rgba(168,85,247,0.5) !important;
    box-shadow: 0 0 16px rgba(168,85,247,0.2) !important;
    color: #fff !important;
}

/* Green */
.skill-badge.green {
    background: rgba(34,197,94,0.05);
    border-color: rgba(34,197,94,0.18);
    color: #22c55e !important;
}

.skill-badge.green:hover {
    background: rgba(34,197,94,0.1) !important;
    border-color: rgba(34,197,94,0.5) !important;
    box-shadow: 0 0 16px rgba(34,197,94,0.18) !important;
    color: #fff !important;
}

.skill-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skill-badge .skill-dot       { background: #00d4ff; box-shadow: 0 0 5px rgba(0,212,255,0.9); }
.skill-badge.purple .skill-dot { background: #a855f7; box-shadow: 0 0 5px rgba(168,85,247,0.9); }
.skill-badge.green .skill-dot  { background: #22c55e; box-shadow: 0 0 5px rgba(34,197,94,0.9); }

/* =========================================================
   EXPERIENCE TIMELINE
   ========================================================= */

.timeline {
    position: relative;
    padding: 0.5em 0;
    text-align: left;
    max-width: 880px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg,
        #00d4ff 0%,
        #a855f7 60%,
        rgba(168,85,247,0) 100%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 2.8em;
    opacity: 0;
    transform: translateX(-28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.slide-in {
    opacity: 1;
    transform: translateX(0);
}

.timeline-marker {
    position: absolute;
    left: 9px;
    top: 7px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0d1117;
    border: 2px solid #00d4ff;
    box-shadow: 0 0 12px rgba(0,212,255,0.45),
                inset 0 0 6px rgba(0,212,255,0.1);
    z-index: 1;
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.timeline-item:nth-child(2) .timeline-marker { border-color: #a855f7; box-shadow: 0 0 12px rgba(168,85,247,0.45); }
.timeline-item:nth-child(3) .timeline-marker { border-color: #00d4ff; }
.timeline-item:nth-child(4) .timeline-marker { border-color: #22c55e; box-shadow: 0 0 12px rgba(34,197,94,0.45); }

.timeline-item:hover .timeline-marker {
    box-shadow: 0 0 22px rgba(0,212,255,0.75), inset 0 0 8px rgba(0,212,255,0.2);
    transform: scale(1.2);
}

.timeline-content {
    background: rgba(22,27,34,0.55);
    border: 1px solid rgba(0,212,255,0.07);
    border-radius: 10px;
    padding: 1.5em 1.8em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(4px);
}

.timeline-item:hover .timeline-content {
    border-color: rgba(0,212,255,0.22);
    box-shadow: 0 6px 30px rgba(0,0,0,0.35), 0 0 0 1px rgba(0,212,255,0.06);
}

.timeline-title {
    font-size: 0.95em !important;
    font-weight: 600 !important;
    color: #e6edf3 !important;
    margin-bottom: 0.2em !important;
    line-height: 1.45em !important;
}

.timeline-title-sub {
    font-weight: 300 !important;
    font-size: 0.85em;
    color: #8b949e !important;
}

.timeline-company {
    font-weight: 600;
    color: #00d4ff !important;
    font-size: 0.72em;
    margin: 0 0 0.2em !important;
    border-bottom: none !important;
}

.timeline-meta {
    font-size: 0.62em;
    color: #8b949e !important;
    margin: 0 0 1em !important;
    font-family: 'JetBrains Mono', monospace;
    opacity: 0.8;
}

.timeline-content ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.timeline-content ul li {
    position: relative;
    padding-left: 1.2em;
    margin-bottom: 0.55em;
    font-size: 0.73em;
    color: #8b949e;
    line-height: 1.65em;
}

.timeline-content ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #00d4ff;
    font-size: 0.8em;
    top: 0.12em;
}

/* =========================================================
   PORTFOLIO CARDS
   ========================================================= */

article.item {
    background: rgba(22,27,34,0.65) !important;
    border: 1px solid rgba(0,212,255,0.06) !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    transition: transform 0.3s ease,
                box-shadow 0.3s ease,
                border-color 0.3s ease !important;
    margin-bottom: 1.4em !important;
}

article.item:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 14px 36px rgba(0,0,0,0.45),
                0 0 0 1px rgba(0,212,255,0.14) !important;
    border-color: rgba(0,212,255,0.18) !important;
}

article.item .image.fit {
    overflow: hidden;
}

article.item .image.fit img {
    transition: transform 0.5s ease !important;
    filter: brightness(0.85) saturate(0.9);
}

article.item:hover .image.fit img {
    transform: scale(1.05);
    filter: brightness(1) saturate(1);
}

article.item header {
    padding: 0.75em 1em !important;
    background: rgba(13,17,23,0.85) !important;
    margin: 0 !important;
    border-top: 1px solid rgba(0,212,255,0.05) !important;
}

article.item header h3 {
    font-size: 0.62em !important;
    color: #c9d1d9 !important;
    letter-spacing: 0.02em;
    line-height: 1.4em !important;
}

/* Section header cards (the wallpaper placeholder ones) */
article.item.section-header {
    background: linear-gradient(135deg,
        rgba(0,212,255,0.07),
        rgba(168,85,247,0.07)) !important;
    border-color: rgba(0,212,255,0.12) !important;
}

article.item.section-header header h3 {
    color: #00d4ff !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em !important;
    font-size: 0.64em !important;
}

/* =========================================================
   CONTACT SECTION
   ========================================================= */

#contact .icons a {
    font-size: 1.6em !important;
}

/* =========================================================
   SCROLLBAR
   ========================================================= */

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #0d1117; }
::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,212,255,0.5); }

/* =========================================================
   SKILLS ICON GRID
   ========================================================= */

/* Icon grid layout override */
.skills-grid--icons {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1em;
    margin-top: 1.8em;
    flex-wrap: unset;
    justify-content: unset;
}

/* Individual skill card */
.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65em;
    padding: 1.3em 0.8em 1.1em;
    background: rgba(22,27,34,0.6);
    border: 1px solid rgba(0,212,255,0.1);
    border-radius: 12px;
    cursor: default;
    position: relative;
    /* bounce-in start state */
    opacity: 0;
    transform: scale(0.6);
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
                opacity 0.35s ease,
                box-shadow 0.3s ease,
                border-color 0.3s ease;
    backdrop-filter: blur(4px);
}

.skill-item.bounced-in {
    opacity: 1;
    transform: scale(1);
}

/* Cyan (default) hover */
.skill-item:hover {
    transform: scale(1.07) translateY(-4px) !important;
    border-color: rgba(0,212,255,0.4);
    box-shadow: 0 0 22px rgba(0,212,255,0.2),
                inset 0 0 20px rgba(0,212,255,0.03);
    animation: skill-pulse-cyan 1.5s ease-in-out infinite;
}

/* Purple variant */
.skill-item--purple {
    border-color: rgba(168,85,247,0.1);
}
.skill-item--purple:hover {
    border-color: rgba(168,85,247,0.4);
    box-shadow: 0 0 22px rgba(168,85,247,0.2),
                inset 0 0 20px rgba(168,85,247,0.03);
    animation: skill-pulse-purple 1.5s ease-in-out infinite;
}

/* Green variant */
.skill-item--green {
    border-color: rgba(34,197,94,0.1);
}
.skill-item--green:hover {
    border-color: rgba(34,197,94,0.4);
    box-shadow: 0 0 22px rgba(34,197,94,0.2),
                inset 0 0 20px rgba(34,197,94,0.03);
    animation: skill-pulse-green 1.5s ease-in-out infinite;
}

/* Icon wrapper */
.skill-icon-wrap {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(0,212,255,0.06);
    border: 1px solid rgba(0,212,255,0.12);
    font-size: 1.25em;
    color: #00d4ff;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
}

.skill-item--purple .skill-icon-wrap {
    background: rgba(168,85,247,0.06);
    border-color: rgba(168,85,247,0.12);
    color: #a855f7;
}

.skill-item--green .skill-icon-wrap {
    background: rgba(34,197,94,0.06);
    border-color: rgba(34,197,94,0.12);
    color: #22c55e;
}

.skill-item:hover .skill-icon-wrap {
    background: rgba(0,212,255,0.12);
    border-color: rgba(0,212,255,0.3);
}
.skill-item--purple:hover .skill-icon-wrap {
    background: rgba(168,85,247,0.12);
    border-color: rgba(168,85,247,0.3);
}
.skill-item--green:hover .skill-icon-wrap {
    background: rgba(34,197,94,0.12);
    border-color: rgba(34,197,94,0.3);
}

/* Skill name */
.skill-name {
    font-size: 0.52em;
    font-family: 'JetBrains Mono', monospace;
    color: #c9d1d9;
    text-align: center;
    line-height: 1.4em;
    letter-spacing: 0.02em;
}

/* Tooltip */
.skill-item::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(13,17,23,0.97);
    border: 1px solid rgba(0,212,255,0.25);
    color: #c9d1d9;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.46em;
    padding: 0.55em 0.9em;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 20;
}

.skill-item--purple::after { border-color: rgba(168,85,247,0.25); }
.skill-item--green::after  { border-color: rgba(34,197,94,0.25); }

.skill-item:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Pulse keyframes */
@keyframes skill-pulse-cyan {
    0%, 100% { box-shadow: 0 0 14px rgba(0,212,255,0.15), inset 0 0 16px rgba(0,212,255,0.02); }
    50%       { box-shadow: 0 0 26px rgba(0,212,255,0.3),  inset 0 0 20px rgba(0,212,255,0.05); }
}
@keyframes skill-pulse-purple {
    0%, 100% { box-shadow: 0 0 14px rgba(168,85,247,0.15), inset 0 0 16px rgba(168,85,247,0.02); }
    50%       { box-shadow: 0 0 26px rgba(168,85,247,0.3),  inset 0 0 20px rgba(168,85,247,0.05); }
}
@keyframes skill-pulse-green {
    0%, 100% { box-shadow: 0 0 14px rgba(34,197,94,0.15), inset 0 0 16px rgba(34,197,94,0.02); }
    50%       { box-shadow: 0 0 26px rgba(34,197,94,0.3),  inset 0 0 20px rgba(34,197,94,0.05); }
}

/* =========================================================
   BUTTON-ONLY PORTFOLIO CARDS
   ========================================================= */

.btn-card {
    min-height: 130px !important;
}

.btn-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.8em 1.2em;
    gap: 1em;
    min-height: 130px;
}

.btn-card-label {
    font-size: 0.62em !important;
    color: #c9d1d9 !important;
    text-align: center;
    line-height: 1.5em;
    margin: 0 !important;
    letter-spacing: 0.02em;
}

/* Cyan variant (default) */
.portfolio-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.55em 1.6em;
    background: transparent;
    border: 1px solid rgba(0,212,255,0.45);
    border-bottom: 1px solid rgba(0,212,255,0.45) !important;
    border-radius: 3px;
    color: #00d4ff !important;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.58em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease !important;
}

.portfolio-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,212,255,0.1), transparent);
    transition: left 0.45s ease;
}

.portfolio-btn:hover::before { left: 100%; }

.portfolio-btn:hover {
    background: rgba(0,212,255,0.08) !important;
    border-color: #00d4ff !important;
    border-bottom-color: #00d4ff !important;
    box-shadow: 0 0 18px rgba(0,212,255,0.3) !important;
    transform: translateY(-2px) !important;
    color: #fff !important;
}

/* Purple variant (Teaching) */
.portfolio-btn--purple {
    border-color: rgba(168,85,247,0.45);
    border-bottom-color: rgba(168,85,247,0.45) !important;
    color: #a855f7 !important;
}

.portfolio-btn--purple::before {
    background: linear-gradient(90deg, transparent, rgba(168,85,247,0.1), transparent);
}

.portfolio-btn--purple:hover {
    background: rgba(168,85,247,0.08) !important;
    border-color: #a855f7 !important;
    border-bottom-color: #a855f7 !important;
    box-shadow: 0 0 18px rgba(168,85,247,0.3) !important;
    color: #fff !important;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media screen and (max-width: 960px) {

    .timeline::before { left: 13px; }
    .timeline-item { padding-left: 44px; }
    .timeline-marker { left: 3px; width: 18px; height: 18px; }
}

@media screen and (max-width: 736px) {
    #intro-headline { font-size: 1.75em !important; }
    #typewriter-text { font-size: 0.58em !important; }
    .skills-grid { gap: 0.5em; }
}
