/* CSS file declaring the different styles */

/* Theme Tokens - site wide colors, shadows and widths*/
:root{
    --bg: #0b0f17;
    --panel: rgba(255,255,255,.06);
    --text: rgba(255,255,255,.92);
    --muted: rgba(255,255,255,.70);
    --muted2: rgba(255,255,255,.55);
    --line: rgba(255,255,255,.14);
    --shadow: 0 10px 35px rgba(0,0,0,.35);
    --radius: 18px;
    --radius2: 24px;
    --max: 1120px;
}

/* Global Layout -  to produce a border inside elements*/
* { box-sizing: border-box; }

/* Smooth Scrolling for in-page anchors */
html { scroll-behavior: smooth; }

/* Base Page Styling - typography, background gradients, text color and spacing*/
body{
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
    background: radial-gradient(1200px 800px at 20% 0%, rgba(124,92,255,.25), transparent 60%),
    radial-gradient(1200px 800px at 80% 20%, rgba(38,214,166,.18), transparent 60%),
    radial-gradient(1200px 800px at 20% 40%, rgba(124,92,255,.25), transparent 60%),
    radial-gradient(1200px 800px at 80% 60%, rgba(38,214,166,.18), transparent 60%),
    radial-gradient(1200px 800px at 20% 80%, rgba(124,92,255,.25), transparent 60%),
    radial-gradient(1200px 800px at 80% 100%, rgba(38,214,166,.18), transparent 60%),
    var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Links - inherit predefined text color and underline upon hover only */
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header - Stay visible with a blurred transparent background and visible bottom border */
header{
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11,15,23,.72);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

/* Set header content layout - width, padding, central position */
.header-inner{
    max-width: var(--max);
    margin: 0 auto;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

/* Style for the brand name and icon at the left side of the header */
.brand{
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}
.brand-badge{
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(124,92,255,.95), rgba(38,214,166,.75));
    box-shadow: 0 10px 25px rgba(124,92,255,.18);
}
.brand-name{
    font-weight: 750;
    letter-spacing: .2px;
    line-height: 1.1;
}

/* Provide characteristics for the navlinks in the header */
/* The flex row of links with a wrapping */
nav{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
/* Pill Buttons */
.navlink{
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
    transition: .18s ease;
}
/* Hover Characteristics */
.navlink:hover{
    color: var(--text);
    border-color: var(--line);
    background: rgba(255,255,255,.04);
    text-decoration: none;
}
/* Active State - used by JS */
.navlink.is-current{
    color: var(--text);
    border-color: rgba(124,92,255,.55);
    background: linear-gradient(135deg, rgba(124,92,255,.18), rgba(38,214,166,.08));
    box-shadow: 0 10px 25px rgba(124,92,255,.12);
    text-decoration: none;
}

/* Main Page Wrapper - centres content and sets consistent padding */
.wrap{
    max-width: var(--max);
    margin: 0 auto;
    padding: 28px 18px 90px;
}

/* Two Column Grid for the headline, info text and right card */
.hero{
    padding: 34px 0 20px;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 22px;
    align-items: center;
}
.hero h1{
    margin: 0 0 10px;
    font-size: clamp(30px, 3.2vw, 46px);
    line-height: 1.15;
    letter-spacing: -0.4px;
}
.hero p{
    margin: 0 0 18px;
    color: var(--muted);
    max-width: 58ch;
    font-size: 16px;
}

/* Call To Actions - Link Buttons in the Hero */
/* Pill Buttons with hover lift */
.cta-row{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.btn{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.05);
    color: var(--text);
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
    transition: .18s ease;
    cursor: pointer;
}
.btn:hover{
    transform: translateY(-1px);
    background: rgba(255,255,255,.08);
    text-decoration: none;
}

/* Generic Card - Border, Panel, Radius and Background */
.card{
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: var(--radius2);
    box-shadow: var(--shadow);
}

/* Styles the Hero Card and its mini blocks */
.hero-card{
    padding: 16px;
}
.hero-card .mini{
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.04);
    margin-bottom: 10px;
}
.mini .k{
    color: var(--muted2);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .35px;
    text-transform: uppercase;
}
.mini .v{
    margin-top: 6px;
    font-weight: 700;
}

/* Section - Adds vertical spacing between sections */
section{
    padding: 26px 0;
    scroll-margin-top: 88px;
}

/* Title and Hint are aligned on one row */
.section-head{
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}
h2{
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.2px;
}
.hint{
    margin: 0;
    color: var(--muted2);
    font-size: 13px;
}

/* Content Panel - Padded Panel for a paragraph */
.panel{
    padding: 18px;
}
.panel p{
    margin: 0;
    color: var(--muted);
}

/* Scroll spy anchors - Invisible anchor to track scroll position*/
.spy-anchor{ height: 1px; }

/* Services - Two-Column grid for services */
.grid-2{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Service Tile - Small Card with Title and Description */
.service{
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.04);
    min-height: 90px;
}
.service h3{
    margin: 0 0 6px;
    font-size: 16px;
}
.service p{
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

/* Detail - A reusable 'detail' view, for expandable sections */
.detail{
    padding: 16px;
}
.detail-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.detail h3{
    margin: 0;
    font-size: 18px;
    letter-spacing: -0.1px;
}
.detail .subline{
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}
.detail .content{
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
}

/* 2 Column Grid of Images */
.media{
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
/* Forces a consistent aspect ratio */
.media img{
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.03);
}

/* Milestones list - Stacked tile layout with consistent spacing */
.milestone-list{
    display: grid;
    gap: 10px;
}
/* Milestone Tile - Clickable Card, hover lift, focus ring and marks for an active tile*/
.milestone-tile{
    width: 100%;
    text-align: left;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.04);
    border-radius: var(--radius);
    padding: 12px 14px;
    min-height: 72px;
    cursor: pointer;
    display: grid;
    gap: 6px;
    transition: .18s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.milestone-tile:hover{
    transform: translateY(-1px);
    background: rgba(255,255,255,.07);
}
.milestone-tile:focus{
    outline: 2px solid rgba(124,92,255,.55);
    outline-offset: 2px;
}
.milestone-tile.is-selected{
    border-color: rgba(124,92,255,.60);
    background: rgba(124,92,255,.10);
    box-shadow: 0 16px 40px rgba(124,92,255,.12);
}

/* Milestone Tile Internals - Before Expanding */
.milestone-row{
    display:flex;
    align-items:flex-start;
    justify-content: space-between;
    gap: 12px;
}
.milestone-title{
    font-weight: 820;
    letter-spacing: .1px;
    line-height: 1.2;
    font-size: 15px;
}
.milestone-sub{
    color: var(--muted);
    font-size: 13px;
    margin-top: 3px;
}
.milestone-pill{
    font-size: 12px;
    font-weight: 850;
    color: rgba(255,255,255,.85);
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.05);
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.milestone-hintline{
    color: var(--muted2);
    font-size: 12px;
}

/* Milestone Expanded Panel - Appears under selected milestone with an entry animation */
.milestone-expanded{
    margin-top: 10px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.04);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
    animation: expandIn .16s ease;
}
@keyframes expandIn{
    from{ opacity: 0; transform: translateY(-2px); }
    to{ opacity: 1; transform: translateY(0); }
}

/* Skills Grid - Responsive Tile Grid with Animations*/
.skills{
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}
/* Skill Card - Centred Icon and Title with Hover Lift */
.skill{
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.04);
    padding: 14px;
    display: grid;
    gap: 10px;
    place-items: center;
    text-align: center;
    aspect-ratio: 1 / 1;
    transition: .18s ease;
}
.skill:hover{
    background: rgba(255,255,255,.07);
    transform: translateY(-1px);
}

/* Skill Logo and Title - For consistent skill formats */
.logo{
    width: 56px;
    height: 56px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight: 900;
    color: rgba(255,255,255,.78);
}
.logo img{
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.skill .name{
    font-weight: 800;
    font-size: 13px;
    color: rgba(255,255,255,.88);
}

/* Contact List - Stacked Contact Rows*/
.contact-list{display:grid;gap:14px}

/* Contact Row Layout - Icon, Details, Actions */
.contact-row{
    display:grid;
    grid-template-columns:44px 1fr auto;
    gap:14px;
    align-items:center;
    padding:14px;
    border-radius:var(--radius);
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.1)
}
.contact-icon{
    width:44px;height:44px;
    display:flex;align-items:center;justify-content:center
}
.contact-icon svg{
    width:22px;height:22px;
    fill:rgba(255,255,255,.9)
}
/* Contact Title */
.contact-title{font-weight:800;font-size:14px}
/* Contact Data */
.contact-value{font-size:13px;color:var(--muted)}
/* Action Buttons */
.contact-actions{
    display:flex;gap:10px;align-items:center
}
.contact-actions a,
.contact-actions button {
    height: 32px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.05);
    color: var(--text);
    cursor: pointer;
}

/* Footer - Separator and Small Print */
footer{
    border-top: 1px solid var(--line);
    padding: 18px;
    color: var(--muted2);
    font-size: 13px;
    text-align: center;
}

/* Responsiveness Rules for Display Sizes */
@media(max-width:640px){
    .contact-row{grid-template-columns:44px 1fr}
    .contact-actions{grid-column:1/-1;margin-left:58px}
    .grid-2{grid-template-columns:1fr}
}
@media (max-width: 980px){
    .hero{ grid-template-columns: 1fr; }
    .skills{ grid-template-columns: repeat(3, 1fr); }
    .grid-2{ grid-template-columns: 1fr; }
}
@media (max-width: 520px){
    .skills{ grid-template-columns: repeat(2, 1fr); }
    .brand{ min-width: auto; }
}

/* Reduce motion - Fewer animations for accessibility */
@media (prefers-reduced-motion: reduce){
    html{ scroll-behavior: auto; }
    .btn, .milestone-tile, .skill{ transition: none; }
    .btn:hover, .milestone-tile:hover, .skill:hover{ transform: none; }
    .milestone-expanded{ animation: none; }
}

/* Mobile header: keeps header compact and make nav scroll horizontally instead of wrapping */
@media (max-width: 640px){
    .header-inner{
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 14px;
        gap: 10px;
    }

    nav{
        width: 100%;
        flex-wrap: nowrap;          /* stop multi-row wrapping */
        overflow-x: auto;           /* allow sideways scroll */
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        gap: 8px;
        padding-bottom: 6px;        /* gives room so links aren't tight to edge */
    }

    .navlink{
        white-space: nowrap;        /* keep each link on one line */
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* Make skills logo's smaller on mobile */
@media (max-width: 640px){
    .logo{ width: 44px; height: 44px; }
    .skill{ padding: 12px; }
}


