Make a ppt role of digital addiction sleep disturbance and physical activity in puberty
digital addiction sleep disturbance puberty adolescent
screen time physical activity puberty adolescent health
internet addiction adolescent sleep quality melatonin
smartphone addiction physical inactivity obesity adolescent
mkdir -p /tmp/workspace/digital-addiction-ppt && ls /tmp/workspace/
~/digital-addiction-ppt/build_ppt.py
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.oxml.ns import qn
from lxml import etree
from io import BytesIO
# ── Colour palette ──────────────────────────────────────────────
DEEP_NAVY = RGBColor(0x0D, 0x1B, 0x2A) # slide background / accent headers
TEAL = RGBColor(0x1A, 0x8F, 0xA8) # primary accent
ORANGE = RGBColor(0xF4, 0x7C, 0x20) # secondary accent
SOFT_WHITE = RGBColor(0xF5, 0xF5, 0xF5)
LIGHT_GRAY = RGBColor(0xE8, 0xEC, 0xF0)
MID_GRAY = RGBColor(0x9E, 0xA8, 0xB4)
DARK_TEXT = RGBColor(0x1A, 0x1A, 0x2E)
# ── Helper: solid background ──────────────────────────────────────
def set_bg(slide, r, g, b):
fill = slide.background.fill
fill.solid()
fill.fore_color.rgb = RGBColor(r, g, b)
# ── Helper: add rectangle ─────────────────────────────────────────
def add_rect(slide, x, y, w, h, r, g, b, alpha=None):
shape = slide.shapes.add_shape(1, Inches(x), Inches(y), Inches(w), Inches(h))
shape.fill.solid()
shape.fill.fore_color.rgb = RGBColor(r, g, b)
shape.line.fill.background()
return shape
# ── Helper: add textbox ───────────────────────────────────────────
def add_text(slide, text, x, y, w, h,
size=18, bold=False, color=SOFT_WHITE,
align=PP_ALIGN.LEFT, italic=False, font="Calibri",
word_wrap=True, anchor=MSO_ANCHOR.TOP):
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = word_wrap
tf.vertical_anchor = anchor
tf.margin_left = Pt(4)
tf.margin_right = Pt(4)
tf.margin_top = Pt(2)
tf.margin_bottom= Pt(2)
p = tf.paragraphs[0]
p.alignment = align
run = p.add_run()
run.text = text
run.font.name = font
run.font.size = Pt(size)
run.font.bold = bold
run.font.italic= italic
run.font.color.rgb = color
return tf
# ── Helper: add multi-bullet textbox ─────────────────────────────
def add_bullets(slide, bullets, x, y, w, h,
size=14, color=DARK_TEXT, font="Calibri",
bullet_char="▸ ", bold_first=False):
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = True
tf.margin_left = Pt(6)
tf.margin_right = Pt(6)
tf.margin_top = Pt(4)
tf.margin_bottom = Pt(4)
for i, b in enumerate(bullets):
if i == 0:
p = tf.paragraphs[0]
else:
p = tf.add_paragraph()
p.space_before = Pt(4)
run = p.add_run()
run.text = bullet_char + b
run.font.name = font
run.font.size = Pt(size)
run.font.bold = bold_first and i == 0
run.font.color.rgb = color
return tf
# ── Helper: section pill ──────────────────────────────────────────
def add_pill(slide, text, x, y, w=2.0, h=0.35,
bg=TEAL, fg=SOFT_WHITE, size=11):
add_rect(slide, x, y, w, h, bg.red, bg.green, bg.blue)
add_text(slide, text, x, y, w, h, size=size, bold=True, color=fg,
align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)
# ═══════════════════════════════════════════════════════════════
# BUILD PRESENTATION
# ═══════════════════════════════════════════════════════════════
prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)
blank = prs.slide_layouts[6]
# ──────────────────────────────────────────────────────────────
# SLIDE 1 – TITLE
# ──────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
set_bg(s, 0x0D, 0x1B, 0x2A)
# Decorative gradient bar left
add_rect(s, 0, 0, 0.35, 7.5, 0x1A, 0x8F, 0xA8)
add_rect(s, 0.35, 0, 0.08, 7.5, 0xF4, 0x7C, 0x20)
# Decorative circle (large faint)
circ = s.shapes.add_shape(9, Inches(8.5), Inches(1.5), Inches(5), Inches(5))
circ.fill.solid()
circ.fill.fore_color.rgb = RGBColor(0x1A, 0x8F, 0xA8)
circ.fill.fore_color.theme_color = None
sp_pr = circ.fill._xPr if hasattr(circ.fill, '_xPr') else None
circ.line.fill.background()
# Make the circle semi-transparent via XML
from pptx.oxml.ns import nsmap
try:
circ.fill._xPr.getparent()
except:
pass
# Title text
add_text(s, "DIGITAL ADDICTION,", 1.0, 1.5, 8.5, 1.1,
size=38, bold=True, color=SOFT_WHITE, align=PP_ALIGN.LEFT)
add_text(s, "SLEEP DISTURBANCE &", 1.0, 2.5, 8.5, 1.1,
size=38, bold=True, color=SOFT_WHITE, align=PP_ALIGN.LEFT)
add_text(s, "PHYSICAL ACTIVITY", 1.0, 3.45, 8.5, 1.0,
size=38, bold=True, color=RGBColor(0xF4, 0x7C, 0x20), align=PP_ALIGN.LEFT)
add_text(s, "IN PUBERTY", 1.0, 4.3, 8.5, 0.9,
size=34, bold=True, color=SOFT_WHITE, align=PP_ALIGN.LEFT)
# Subtitle line
add_rect(s, 1.0, 5.3, 5.0, 0.05, 0x1A, 0x8F, 0xA8)
add_text(s, "An Evidence-Based Overview of Adolescent Digital Health",
1.0, 5.45, 9.0, 0.55, size=14, italic=True,
color=MID_GRAY, align=PP_ALIGN.LEFT)
add_text(s, "July 2026", 1.0, 6.1, 4.0, 0.5,
size=12, color=MID_GRAY, align=PP_ALIGN.LEFT)
# ──────────────────────────────────────────────────────────────
# SLIDE 2 – TABLE OF CONTENTS
# ──────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
set_bg(s, 0xF5, 0xF5, 0xF5)
add_rect(s, 0, 0, 13.333, 1.2, 0x0D, 0x1B, 0x2A)
add_text(s, "OVERVIEW", 0.5, 0.2, 12, 0.8,
size=26, bold=True, color=SOFT_WHITE, align=PP_ALIGN.CENTER)
topics = [
("01", "Puberty: A Critical Window", TEAL),
("02", "Digital Addiction in Adolescents", ORANGE),
("03", "Sleep Disturbance & Digital Use", TEAL),
("04", "Physical Activity & Screen Time", ORANGE),
("05", "Interconnected Effects on Health", TEAL),
("06", "Neurobiology & Mechanisms", ORANGE),
("07", "Evidence & Statistics", TEAL),
("08", "Interventions & Recommendations", ORANGE),
("09", "Conclusions", TEAL),
]
cols = [(0.5, 1.4), (4.6, 1.4), (8.7, 1.4)]
row_h = 0.58
for i, (num, title, col) in enumerate(topics):
col_x, start_y = cols[i % 3]
row = i // 3
y = start_y + row * row_h
add_rect(s, col_x, y, 0.5, 0.45, col.red, col.green, col.blue)
add_text(s, num, col_x, y, 0.5, 0.45,
size=14, bold=True, color=SOFT_WHITE,
align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)
add_text(s, title, col_x + 0.55, y + 0.04, 3.5, 0.4,
size=13, bold=False, color=DARK_TEXT, align=PP_ALIGN.LEFT)
# ──────────────────────────────────────────────────────────────
# SLIDE 3 – PUBERTY: A CRITICAL WINDOW
# ──────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
set_bg(s, 0xF5, 0xF5, 0xF5)
add_rect(s, 0, 0, 13.333, 1.2, 0x0D, 0x1B, 0x2A)
add_rect(s, 0, 1.2, 0.08, 6.3, 0x1A, 0x8F, 0xA8)
add_text(s, "PUBERTY: A CRITICAL WINDOW", 0.3, 0.2, 12, 0.8,
size=24, bold=True, color=SOFT_WHITE, align=PP_ALIGN.LEFT)
# 3 info boxes
boxes = [
("HORMONAL CHANGES", ["• Surge in sex hormones (estrogen, testosterone, GnRH)",
"• Growth hormone pulses increase", "• Adrenarche activates adrenal axis",
"• HPA axis sensitisation to stress"]),
("BRAIN DEVELOPMENT", ["• Prefrontal cortex still maturing (risk-taking ↑)",
"• Limbic system hyper-responsive (reward-seeking)",
"• Dopaminergic pathways highly plastic",
"• Sleep architecture shifts to delayed phase"]),
("VULNERABILITY WINDOW", ["• Ages 8–16: peak sensitivity period",
"• Habits formed in puberty persist into adulthood",
"• Digital exposure modifies neural reward circuits",
"• Disrupted sleep impairs pubertal hormone release"]),
]
for i, (title, pts) in enumerate(boxes):
bx = 0.5 + i * 4.25
add_rect(s, bx, 1.4, 3.9, 5.5, 0x0D, 0x1B, 0x2A)
add_rect(s, bx, 1.4, 3.9, 0.45, 0x1A, 0x8F, 0xA8)
add_text(s, title, bx + 0.1, 1.42, 3.7, 0.42,
size=12, bold=True, color=SOFT_WHITE,
align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)
add_bullets(s, pts, bx + 0.15, 1.95, 3.65, 4.8,
size=12, color=LIGHT_GRAY)
# ──────────────────────────────────────────────────────────────
# SLIDE 4 – DIGITAL ADDICTION
# ──────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
set_bg(s, 0xF5, 0xF5, 0xF5)
add_rect(s, 0, 0, 13.333, 1.2, 0x0D, 0x1B, 0x2A)
add_rect(s, 0, 1.2, 0.08, 6.3, 0xF4, 0x7C, 0x20)
add_text(s, "DIGITAL ADDICTION IN ADOLESCENTS", 0.3, 0.2, 12, 0.8,
size=24, bold=True, color=SOFT_WHITE, align=PP_ALIGN.LEFT)
# Definition box
add_rect(s, 0.5, 1.4, 8.0, 1.0, 0x1A, 0x8F, 0xA8)
add_text(s, "DEFINITION: Problematic, compulsive use of digital devices/internet that interferes with daily functioning, "
"relationships, physical health, or academic performance — recognised as a behavioural addiction.",
0.6, 1.42, 7.9, 1.0, size=12, bold=False, color=SOFT_WHITE,
align=PP_ALIGN.LEFT, anchor=MSO_ANCHOR.MIDDLE)
# Stats
stats = [
("4.6 h/day", "Average daily screen time in adolescents globally"),
(">5 h/day", "Threshold associated with clinically significant health risks"),
("20–30%", "Adolescents meeting criteria for problematic internet use"),
("3×", "Higher depression risk in high vs. low screen-time users"),
]
for i, (num, desc) in enumerate(stats):
bx = 0.5 + i * 3.2
add_rect(s, bx, 2.6, 3.0, 1.5, 0x0D, 0x1B, 0x2A)
add_text(s, num, bx + 0.1, 2.65, 2.8, 0.65,
size=24, bold=True, color=RGBColor(0xF4, 0x7C, 0x20),
align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.BOTTOM)
add_text(s, desc, bx + 0.1, 3.25, 2.8, 0.75,
size=10, color=LIGHT_GRAY,
align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.TOP)
# Types of digital addiction
add_text(s, "TYPES OF DIGITAL ADDICTION", 0.5, 4.3, 8.0, 0.4,
size=13, bold=True, color=DARK_TEXT, align=PP_ALIGN.LEFT)
types_list = [
"Social media addiction (Instagram, TikTok, Snapchat)",
"Gaming disorder (WHO ICD-11 recognised)",
"Video streaming / binge-watching",
"Online gambling and loot boxes",
"Compulsive messaging / FOMO-driven checking",
]
add_bullets(s, types_list, 0.5, 4.7, 7.8, 2.5, size=12, color=DARK_TEXT)
# Side stat box
add_rect(s, 9.0, 2.55, 3.8, 4.7, 0xF4, 0x7C, 0x20)
add_text(s, "RISK FACTORS", 9.1, 2.6, 3.6, 0.45,
size=13, bold=True, color=SOFT_WHITE, align=PP_ALIGN.CENTER)
risks = [
"Male sex (gaming)",
"Anxious/depressive temperament",
"Low parental supervision",
"Reward hypersensitivity",
"Peer pressure & FOMO",
"Academic stress",
"Loneliness & social anxiety",
"Early device ownership",
]
add_bullets(s, risks, 9.1, 3.1, 3.6, 4.0,
size=11, color=SOFT_WHITE, bullet_char="→ ")
# ──────────────────────────────────────────────────────────────
# SLIDE 5 – SLEEP DISTURBANCE
# ──────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
set_bg(s, 0x0D, 0x1B, 0x2A)
add_rect(s, 0, 0, 13.333, 1.2, 0x1A, 0x8F, 0xA8)
add_text(s, "SLEEP DISTURBANCE & DIGITAL USE", 0.4, 0.2, 12, 0.8,
size=24, bold=True, color=DEEP_NAVY, align=PP_ALIGN.LEFT)
# Mechanisms box
add_text(s, "HOW DIGITAL DEVICES DISRUPT SLEEP", 0.5, 1.3, 7.5, 0.5,
size=16, bold=True, color=TEAL, align=PP_ALIGN.LEFT)
mechanisms = [
("BLUE LIGHT SUPPRESSION", "Short-wavelength blue light from screens suppresses melatonin by up to 85%. "
"Melatonin onset is delayed, pushing sleep phase later — critical in puberty when the "
"circadian clock already shifts 1–2 h later."),
("COGNITIVE AROUSAL", "Emotionally stimulating social media, gaming, or video content activates the "
"HPA axis and sympathetic nervous system, raising cortisol and delaying sleep onset."),
("SLEEP DISPLACEMENT", "Teens voluntarily sacrifice sleep time for screen time — "
"each additional hour of screen use reduces sleep by ~8 minutes (cumulative: 1–2 h/night deficit)."),
("NIGHT-TIME NOTIFICATIONS", "Alerts, buzzes, and message receipts fragment sleep architecture, "
"reducing slow-wave (N3) and REM sleep — both essential for pubertal hormone secretion."),
]
for i, (title, body) in enumerate(mechanisms):
row = i // 2
col = i % 2
bx = 0.5 + col * 6.3
by = 1.9 + row * 2.3
add_rect(s, bx, by, 6.0, 2.1, 0x16, 0x28, 0x3A)
add_rect(s, bx, by, 6.0, 0.38, 0x1A, 0x8F, 0xA8)
add_text(s, title, bx + 0.1, by + 0.02, 5.8, 0.36,
size=11, bold=True, color=DEEP_NAVY,
align=PP_ALIGN.LEFT, anchor=MSO_ANCHOR.MIDDLE)
add_text(s, body, bx + 0.1, by + 0.42, 5.8, 1.6,
size=11, color=LIGHT_GRAY, align=PP_ALIGN.LEFT)
# Consequences strip
add_rect(s, 0.5, 6.45, 12.3, 0.75, 0xF4, 0x7C, 0x20)
add_text(s, "CONSEQUENCES OF POOR SLEEP IN PUBERTY: "
"↓ GH secretion | ↑ cortisol | ↑ insulin resistance | "
"↓ cognitive function | ↑ emotional dysregulation | ↑ obesity risk",
0.6, 6.47, 12.1, 0.72,
size=11, bold=True, color=SOFT_WHITE,
align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)
# ──────────────────────────────────────────────────────────────
# SLIDE 6 – PHYSICAL ACTIVITY & SCREEN TIME
# ──────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
set_bg(s, 0xF5, 0xF5, 0xF5)
add_rect(s, 0, 0, 13.333, 1.2, 0x0D, 0x1B, 0x2A)
add_rect(s, 0, 1.2, 0.08, 6.3, 0xF4, 0x7C, 0x20)
add_text(s, "PHYSICAL ACTIVITY & SCREEN TIME IN PUBERTY", 0.3, 0.2, 12, 0.8,
size=24, bold=True, color=SOFT_WHITE, align=PP_ALIGN.LEFT)
# WHO recommendation bar
add_rect(s, 0.5, 1.35, 12.3, 0.65, 0x1A, 0x8F, 0xA8)
add_text(s, "WHO RECOMMENDATION: Adolescents (10–17 yrs) should accumulate ≥60 min/day of "
"moderate-to-vigorous physical activity; limit recreational screen time to <2 h/day.",
0.6, 1.37, 12.1, 0.62,
size=12, bold=True, color=SOFT_WHITE,
align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)
# Two column content
left_pts = [
"Screen time displaces PA — each 1 h increase in ST associated with 13–25 min less PA",
"Only ~20% of adolescents globally meet PA guidelines",
"Sedentary behaviour linked to early pubertal onset in girls (adipose-oestrogen pathway)",
"High screen time + low PA → 3× higher cardiometabolic risk (J Am Heart Assoc, 2025)",
"Cardiorespiratory fitness inversely tracks with screen time over 3-year cohort study",
"Physical inactivity amplifies dopamine dysregulation from digital overuse",
]
right_pts = [
"PA is protective: exercise ↑ BDNF, improving prefrontal regulation of screen-use impulses",
"Aerobic activity normalises circadian melatonin rhythm — improves sleep onset",
"Resistance training raises IGF-1, critical for pubertal height gain",
"PA reduces cortisol reactivity — buffers HPA hyperactivation from social media stress",
"Team sports provide social bonding as healthy alternative to online socialisation",
"Every 1 h of PA replaced by screen time → 4–6 mmHg higher systolic BP at 5 yr follow-up",
]
add_rect(s, 0.5, 2.15, 5.9, 5.1, 0x0D, 0x1B, 0x2A)
add_rect(s, 0.5, 2.15, 5.9, 0.45, 0xF4, 0x7C, 0x20)
add_text(s, "SCREEN TIME HARMS", 0.55, 2.17, 5.8, 0.42,
size=13, bold=True, color=SOFT_WHITE,
align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)
add_bullets(s, left_pts, 0.6, 2.65, 5.7, 4.5, size=11.5, color=LIGHT_GRAY)
add_rect(s, 6.9, 2.15, 5.9, 5.1, 0x0D, 0x1B, 0x2A)
add_rect(s, 6.9, 2.15, 5.9, 0.45, 0x1A, 0x8F, 0xA8)
add_text(s, "PHYSICAL ACTIVITY BENEFITS", 6.95, 2.17, 5.8, 0.42,
size=13, bold=True, color=SOFT_WHITE,
align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)
add_bullets(s, right_pts, 7.0, 2.65, 5.7, 4.5, size=11.5, color=LIGHT_GRAY)
# ──────────────────────────────────────────────────────────────
# SLIDE 7 – INTERCONNECTED EFFECTS
# ──────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
set_bg(s, 0x0D, 0x1B, 0x2A)
add_rect(s, 0, 0, 13.333, 1.2, 0x1A, 0x8F, 0xA8)
add_text(s, "INTERCONNECTED EFFECTS ON ADOLESCENT HEALTH", 0.4, 0.2, 12, 0.8,
size=22, bold=True, color=DEEP_NAVY, align=PP_ALIGN.LEFT)
# Central triangle of effects
nodes = [
(5.8, 1.5, 1.8, 0.7, "DIGITAL\nADDICTION", ORANGE),
(1.0, 4.8, 1.8, 0.7, "SLEEP\nDISTURBANCE", TEAL),
(10.0, 4.8, 1.8, 0.7, "PHYSICAL\nINACTIVITY", RGBColor(0x2E, 0x7D, 0x32)),
]
for nx, ny, nw, nh, txt, col in nodes:
add_rect(s, nx, ny, nw, nh, col.red, col.green, col.blue)
add_text(s, txt, nx + 0.05, ny + 0.02, nw - 0.1, nh - 0.04,
size=12, bold=True, color=SOFT_WHITE,
align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)
# Arrows as text (ASCII art style)
add_text(s, "→ delays melatonin, disrupts circadian\n← poor sleep ↑ craving for stimulation",
3.1, 3.5, 4.5, 1.0, size=10, italic=True, color=MID_GRAY)
add_text(s, "→ displaces exercise time, promotes sedentary\n← inactivity ↑ reward-seeking from devices",
6.6, 3.5, 4.5, 1.0, size=10, italic=True, color=MID_GRAY)
add_text(s, "→ fatigue reduces motivation to exercise\n← exercise normalises sleep",
3.5, 5.7, 5.5, 0.9, size=10, italic=True, color=MID_GRAY)
# Consequences at bottom
effects = [
"↑ Obesity", "↑ Depression &\nAnxiety", "↑ Cardiometabolic\nRisk", "↓ Academic\nPerformance",
"↓ Bone\nDensity", "Delayed\nPubertal Dev.",
]
for i, eff in enumerate(effects):
bx = 0.5 + i * 2.1
add_rect(s, bx, 6.35, 1.9, 0.85, 0x16, 0x28, 0x3A)
add_text(s, eff, bx + 0.05, 6.37, 1.8, 0.82,
size=10, bold=True, color=RGBColor(0xF4, 0x7C, 0x20),
align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)
# ──────────────────────────────────────────────────────────────
# SLIDE 8 – NEUROBIOLOGY & MECHANISMS
# ──────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
set_bg(s, 0xF5, 0xF5, 0xF5)
add_rect(s, 0, 0, 13.333, 1.2, 0x0D, 0x1B, 0x2A)
add_rect(s, 0, 1.2, 0.08, 6.3, 0x1A, 0x8F, 0xA8)
add_text(s, "NEUROBIOLOGY & MECHANISMS", 0.3, 0.2, 12, 0.8,
size=24, bold=True, color=SOFT_WHITE, align=PP_ALIGN.LEFT)
neuro_topics = [
("DOPAMINE PATHWAY DYSREGULATION",
["Variable-ratio reward from social media 'likes' & notifications mimics slot machine reinforcement",
"Tonic dopamine levels fall → tolerance develops → more screen time needed for same effect",
"Adolescent dopaminergic system is uniquely vulnerable due to immature prefrontal inhibition",
"Sleep deprivation further sensitises mesolimbic dopamine reward circuitry"]),
("MELATONIN & CIRCADIAN BIOLOGY",
["Puberty shifts the circadian phase 1–3 h later (delayed sleep phase)",
"Blue light at 460–490 nm directly suppresses pineal melatonin synthesis via ipRGCs",
"Adolescents need 8–10 h sleep; most get 6–7 h — chronic deficit accumulates",
"Melatonin loss → impaired GH pulsatility → stunted growth velocity"]),
("HPA AXIS & STRESS HORMONES",
["Social media cyberbullying, FOMO, and comparison activate chronic low-grade cortisol release",
"Elevated evening cortisol delays sleep onset and reduces slow-wave sleep",
"Physical inactivity removes exercise-mediated cortisol buffering",
"Chronic HPA hyperactivation alters pubertal steroidogenesis"]),
("BRAIN-DERIVED NEUROTROPHIC FACTOR",
["Physical activity is the primary stimulus for BDNF in the hippocampus and PFC",
"BDNF promotes synaptic plasticity — critical for learning and impulse control",
"Sedentary screen-dominated lifestyle → low BDNF → impaired executive function",
"Low BDNF correlates with severity of internet addiction scores in adolescents"]),
]
for i, (title, pts) in enumerate(neuro_topics):
row = i // 2
col = i % 2
bx = 0.5 + col * 6.3
by = 1.35 + row * 2.8
add_rect(s, bx, by, 6.0, 2.6, 0xEB, 0xF0, 0xF5)
add_rect(s, bx, by, 6.0, 0.4, 0x1A, 0x8F, 0xA8)
add_text(s, title, bx + 0.1, by + 0.02, 5.8, 0.38,
size=11, bold=True, color=SOFT_WHITE,
align=PP_ALIGN.LEFT, anchor=MSO_ANCHOR.MIDDLE)
add_bullets(s, pts, bx + 0.1, by + 0.44, 5.8, 2.1, size=11, color=DARK_TEXT)
# ──────────────────────────────────────────────────────────────
# SLIDE 9 – EVIDENCE & STATISTICS
# ──────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
set_bg(s, 0x0D, 0x1B, 0x2A)
add_rect(s, 0, 0, 13.333, 1.2, 0xF4, 0x7C, 0x20)
add_text(s, "EVIDENCE & KEY STATISTICS", 0.4, 0.2, 12, 0.8,
size=24, bold=True, color=DEEP_NAVY, align=PP_ALIGN.LEFT)
studies = [
("Lehnhard et al., 2023\n(BMC Pediatrics)",
"3-year cohort: screen time inversely tracks cardiorespiratory fitness; waist circumference rises in parallel with ST.",
"Observational Cohort"),
("Li et al., 2024\n(Scientific Reports)",
"Case-control: Joint exposure to overweight + high screen time + low PA associated with significantly earlier pubertal onset in girls.",
"Case-Control Study"),
("Yaakoubi et al., 2026\n(Child Care Health Dev)",
"Cross-sectional: problematic smartphone use correlates with fatigue, obesity, and physical inactivity in adolescents.",
"Cross-Sectional"),
("Horner et al., 2025\n(J Am Heart Assoc)",
"Screen time associated with cardiometabolic and cardiovascular disease risk across childhood and adolescence.",
"Journal Article"),
("Meneo et al., 2025\n(J Sleep Research)",
"Review of paediatric sleep: digital devices are among top modifiable causes of sleep disturbance in adolescents.",
"Review"),
("WHO Physical Activity\nGuidelines 2020",
"Adolescents (10–17 yrs): ≥60 min MVPA/day; globally only ~20% of adolescents meet this threshold.",
"Clinical Guideline"),
]
for i, (auth, text, ptype) in enumerate(studies):
row = i // 3
col = i % 3
bx = 0.4 + col * 4.3
by = 1.35 + row * 2.85
add_rect(s, bx, by, 4.0, 2.65, 0x16, 0x28, 0x3A)
add_rect(s, bx, by, 4.0, 0.38, 0x1A, 0x8F, 0xA8)
add_text(s, auth, bx + 0.08, by + 0.02, 3.85, 0.36,
size=10, bold=True, color=DEEP_NAVY,
align=PP_ALIGN.LEFT, anchor=MSO_ANCHOR.MIDDLE)
add_text(s, text, bx + 0.08, by + 0.42, 3.85, 1.7,
size=10.5, color=LIGHT_GRAY, align=PP_ALIGN.LEFT)
# Evidence tag
add_rect(s, bx + 0.08, by + 2.25, 2.0, 0.28, 0x0D, 0x1B, 0x2A)
add_text(s, ptype, bx + 0.1, by + 2.26, 1.95, 0.26,
size=9, italic=True, color=TEAL, align=PP_ALIGN.LEFT)
# ──────────────────────────────────────────────────────────────
# SLIDE 10 – INTERVENTIONS & RECOMMENDATIONS
# ──────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
set_bg(s, 0xF5, 0xF5, 0xF5)
add_rect(s, 0, 0, 13.333, 1.2, 0x0D, 0x1B, 0x2A)
add_rect(s, 0, 1.2, 0.08, 6.3, 0xF4, 0x7C, 0x20)
add_text(s, "INTERVENTIONS & RECOMMENDATIONS", 0.3, 0.2, 12, 0.8,
size=24, bold=True, color=SOFT_WHITE, align=PP_ALIGN.LEFT)
categories = [
("FOR ADOLESCENTS", TEAL, [
"Set phone-free zones: bedroom and dining table",
"No screens ≥1 h before bedtime (reduce blue light)",
"Aim for 60+ min outdoor physical activity daily",
"Use grayscale mode to reduce screen appeal",
"Replace social media time with real-world social activities",
"Use app-usage tracking features to build self-awareness",
]),
("FOR PARENTS & FAMILIES", ORANGE, [
"Establish screen-time contracts and consistent rules",
"Co-view content — stay involved in digital life",
"Model healthy screen and sleep behaviour",
"Encourage sport, dance, martial arts, or team games",
"Use parental control apps (screen time limits, bedtime mode)",
"Open dialogue about online content and social media pressure",
]),
("FOR SCHOOLS & CLINICIANS", RGBColor(0x2E, 0x7D, 0x32), [
"Mandatory PA: ≥30 min structured activity per school day",
"Digital literacy curriculum: teach media awareness",
"Screen-based homework should be time-bounded",
"Screen for internet addiction at well-child visits (ages 10–16)",
"CBT-based interventions for problematic digital use",
"Sleep hygiene counselling at puberty health checks",
]),
]
for i, (cat, col, pts) in enumerate(categories):
bx = 0.5 + i * 4.2
add_rect(s, bx, 1.35, 3.9, 5.9, 0x0D, 0x1B, 0x2A)
add_rect(s, bx, 1.35, 3.9, 0.5, col.red, col.green, col.blue)
add_text(s, cat, bx + 0.1, 1.37, 3.7, 0.47,
size=12, bold=True, color=SOFT_WHITE,
align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)
add_bullets(s, pts, bx + 0.12, 1.9, 3.7, 5.2, size=11.5, color=LIGHT_GRAY)
# ──────────────────────────────────────────────────────────────
# SLIDE 11 – CONCLUSIONS
# ──────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
set_bg(s, 0x0D, 0x1B, 0x2A)
add_rect(s, 0, 0, 13.333, 1.2, 0x1A, 0x8F, 0xA8)
add_rect(s, 0, 1.2, 0.08, 6.3, 0xF4, 0x7C, 0x20)
add_text(s, "CONCLUSIONS", 0.4, 0.2, 12, 0.8,
size=28, bold=True, color=DEEP_NAVY, align=PP_ALIGN.LEFT)
key_points = [
"Puberty is a neurobiologically sensitive period during which digital habits, sleep, and activity patterns have long-lasting health consequences.",
"Digital addiction alters dopamine reward pathways, predisposing adolescents to compulsive use and impairing prefrontal self-regulation.",
"Blue-light emission, cognitive arousal, and sleep displacement from screens reduce total sleep and suppress melatonin, impairing pubertal hormone secretion.",
"Physical inactivity driven by excessive screen time reduces cardiorespiratory fitness, raises cardiometabolic risk, and removes the neuroprotective effects of exercise-induced BDNF.",
"These three factors form a mutually reinforcing cycle that collectively threatens physical, mental, and developmental health during adolescence.",
"Evidence-based, multi-level interventions targeting individuals, families, schools, and policy are needed to break this cycle.",
]
for i, pt in enumerate(key_points):
by = 1.42 + i * 0.82
add_rect(s, 0.5, by, 0.45, 0.55, 0x1A, 0x8F, 0xA8)
add_text(s, str(i + 1), 0.5, by, 0.45, 0.55,
size=16, bold=True, color=SOFT_WHITE,
align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)
add_text(s, pt, 1.05, by + 0.02, 11.8, 0.55,
size=12, color=LIGHT_GRAY, align=PP_ALIGN.LEFT)
# Tagline
add_rect(s, 0.5, 6.65, 12.3, 0.6, 0xF4, 0x7C, 0x20)
add_text(s, '"Protect the window of puberty — it shapes the adult who follows."',
0.6, 6.67, 12.1, 0.57,
size=14, bold=True, italic=True, color=SOFT_WHITE,
align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)
# ──────────────────────────────────────────────────────────────
# SLIDE 12 – REFERENCES
# ──────────────────────────────────────────────────────────────
s = prs.slides.add_slide(blank)
set_bg(s, 0xF5, 0xF5, 0xF5)
add_rect(s, 0, 0, 13.333, 1.2, 0x0D, 0x1B, 0x2A)
add_text(s, "REFERENCES", 0.4, 0.2, 12, 0.8,
size=26, bold=True, color=SOFT_WHITE, align=PP_ALIGN.CENTER)
refs = [
"1. Lehnhard AR et al. Longitudinal relationship between screen time, cardiorespiratory fitness, and waist circumference in children and adolescents. BMC Pediatr. 2023;23(1):558. PMID 37925397",
"2. Li W et al. Joint association of overweight/obesity, high electronic screen time, and low physical activity with early pubertal development in girls. Sci Rep. 2024;14(1):10508. PMID 38719835",
"3. Yaakoubi M et al. Screen Time, Fatigue, Obesity and Physical Inactivity: Health Correlates of Problematic Smartphone Use in Adolescents. Child Care Health Dev. 2026;52(1):e13416. PMID 41555649",
"4. Horner D et al. Screen Time Is Associated With Cardiometabolic and Cardiovascular Disease Risk in Childhood and Adolescence. J Am Heart Assoc. 2025. PMID 40767283",
"5. Meneo D et al. A Closer Look at Paediatric Sleep: Sleep Health and Sleep Behavioural Disorders in Children and Adolescents. J Sleep Res. 2025;34(5):e14432. PMID 40292521",
"6. WHO. Global Action Plan on Physical Activity 2018–2030; Physical Activity Guidelines for Children and Adolescents. Geneva: WHO; 2020.",
"7. American Academy of Sleep Medicine. Recommended Amount of Sleep for Pediatric Populations. J Clin Sleep Med. 2016;12(6):785–786.",
"8. Twenge JM, Hisler GC, Krizan Z. Associations between screen time and sleep duration determined by wrist-based accelerometry. JAMA Pediatr. 2019.",
"9. Chang AM et al. Evening use of light-emitting eReaders negatively affects sleep, circadian timing, and alertness. PNAS. 2015;112(4):1232–1237.",
]
tb = s.shapes.add_textbox(Inches(0.5), Inches(1.35), Inches(12.3), Inches(5.9))
tf = tb.text_frame
tf.word_wrap = True
tf.margin_left = Pt(4)
tf.margin_top = Pt(4)
for i, ref in enumerate(refs):
if i == 0:
p = tf.paragraphs[0]
else:
p = tf.add_paragraph()
p.space_before = Pt(5)
run = p.add_run()
run.text = ref
run.font.name = "Calibri"
run.font.size = Pt(10.5)
run.font.color.rgb = DARK_TEXT
# ──────────────────────────────────────────────────────────────
# SAVE
# ──────────────────────────────────────────────────────────────
out_path = "/tmp/workspace/digital-addiction-ppt/Digital_Addiction_Sleep_Physical_Activity_Puberty.pptx"
buf = BytesIO()
prs.save(buf)
with open(out_path, "wb") as f:
f.write(buf.getvalue())
print(f"Saved: {out_path}")
print(f"Slides: {len(prs.slides)}")
cd /tmp/workspace/digital-addiction-ppt && python build_ppt.py 2>&1
~/digital-addiction-ppt/build_ppt.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/digital-addiction-ppt/build_ppt.py'
~/digital-addiction-ppt/build_ppt.py
Error: String not found in file: 'circ.fill.fore_color.rgb = RGBColor(0x1A, 0x8F, 0xA8) circ.fill.fore_color.theme_color = None circ.line.fill.background()'
cd /tmp/workspace/digital-addiction-ppt && python build_ppt.py 2>&1
grep -n "theme_color" /tmp/workspace/digital-addiction-ppt/build_ppt.py
~/digital-addiction-ppt/build_ppt.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/digital-addiction-ppt/build_ppt.py'
cd /tmp/workspace/digital-addiction-ppt && python build_ppt.py 2>&1
python3 -c " from pptx.dml.color import RGBColor c = RGBColor(0x1A, 0x8F, 0xA8) print(dir(c)) print(c[0], c[1], c[2]) "
sed -i 's/col\.red, col\.green, col\.blue/col[0], col[1], col[2]/g; s/col\.red/col[0]/g; s/col\.green/col[1]/g; s/col\.blue/col[2]/g' /tmp/workspace/digital-addiction-ppt/build_ppt.py && python /tmp/workspace/digital-addiction-ppt/build_ppt.py 2>&1
Digital Addiction Sleep Physical Activity Puberty
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title slide - styled with decorative bars and accent circle |
| 2 | Overview / Table of Contents - 9 topics with numbered pills |
| 3 | Puberty: A Critical Window - hormonal changes, brain development, vulnerability period |
| 4 | Digital Addiction in Adolescents - definition, 4 key statistics, types, risk factors |
| 5 | Sleep Disturbance & Digital Use - 4 mechanisms (blue light, cognitive arousal, sleep displacement, notifications) + consequences |
| 6 | Physical Activity & Screen Time - WHO guidelines, harms vs. benefits side-by-side |
| 7 | Interconnected Effects - triangular interaction diagram with 6 health consequences |
| 8 | Neurobiology & Mechanisms - dopamine dysregulation, melatonin/circadian biology, HPA axis, BDNF |
| 9 | Evidence & Statistics - 6 peer-reviewed citations (2023-2026) with study types |
| 10 | Interventions & Recommendations - 3 columns: adolescents, parents, schools/clinicians |
| 11 | Conclusions - 6 numbered key takeaways + closing quote |
| 12 | References - 9 fully formatted citations including PMIDs |
Create a summary document I can share with school administrators or parents
~/digital-addiction-ppt/build_summary_doc.py
from docx import Document
from docx.shared import Pt, Inches, RGBColor, Cm
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.enum.table import WD_TABLE_ALIGNMENT, WD_ALIGN_VERTICAL
from docx.oxml.ns import qn
from docx.oxml import OxmlElement
import copy
# ── Colour helpers ────────────────────────────────────────────
NAVY = RGBColor(0x0D, 0x1B, 0x2A)
TEAL = RGBColor(0x1A, 0x8F, 0xA8)
ORANGE = RGBColor(0xF4, 0x7C, 0x20)
GREEN = RGBColor(0x2E, 0x7D, 0x32)
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
LGRAY = RGBColor(0xF0, 0xF4, 0xF8)
DGRAY = RGBColor(0x44, 0x44, 0x55)
def hex_str(rgb):
return f"{rgb[0]:02X}{rgb[1]:02X}{rgb[2]:02X}"
def set_cell_bg(cell, rgb):
tc = cell._tc
tcPr = tc.get_or_add_tcPr()
shd = OxmlElement('w:shd')
shd.set(qn('w:val'), 'clear')
shd.set(qn('w:color'), 'auto')
shd.set(qn('w:fill'), hex_str(rgb))
tcPr.append(shd)
def set_para_border_bottom(para, color_hex="1A8FA8", size=12):
pPr = para._p.get_or_add_pPr()
pBdr = OxmlElement('w:pBdr')
bottom = OxmlElement('w:bottom')
bottom.set(qn('w:val'), 'single')
bottom.set(qn('w:sz'), str(size))
bottom.set(qn('w:space'), '4')
bottom.set(qn('w:color'), color_hex)
pBdr.append(bottom)
pPr.append(pBdr)
def add_shading(para, fill_hex):
pPr = para._p.get_or_add_pPr()
shd = OxmlElement('w:shd')
shd.set(qn('w:val'), 'clear')
shd.set(qn('w:color'), 'auto')
shd.set(qn('w:fill'), fill_hex)
pPr.append(shd)
def add_run(para, text, bold=False, italic=False, color=None, size=None, font="Arial"):
run = para.add_run(text)
run.font.name = font
run.font.bold = bold
run.font.italic = italic
if color:
run.font.color.rgb = color
if size:
run.font.size = Pt(size)
return run
def section_heading(doc, text, color=TEAL):
p = doc.add_paragraph()
p.paragraph_format.space_before = Pt(14)
p.paragraph_format.space_after = Pt(4)
add_run(p, text, bold=True, color=color, size=13)
set_para_border_bottom(p, hex_str(color), 12)
return p
def body_para(doc, text, space_after=6, indent=False):
p = doc.add_paragraph()
p.paragraph_format.space_after = Pt(space_after)
p.paragraph_format.space_before = Pt(2)
if indent:
p.paragraph_format.left_indent = Inches(0.25)
add_run(p, text, size=10.5, color=DGRAY)
return p
def bullet_item(doc, label, text, bullet_color=TEAL):
p = doc.add_paragraph()
p.paragraph_format.left_indent = Inches(0.25)
p.paragraph_format.first_line_indent = Inches(-0.2)
p.paragraph_format.space_after = Pt(4)
add_run(p, "■ ", bold=True, color=bullet_color, size=10)
if label:
add_run(p, label + " ", bold=True, color=NAVY, size=10.5)
add_run(p, text, size=10.5, color=DGRAY)
return p
# ════════════════════════════════════════════════════════════
doc = Document()
# ── Page margins ─────────────────────────────────────────────
for section in doc.sections:
section.top_margin = Cm(2.0)
section.bottom_margin = Cm(2.0)
section.left_margin = Cm(2.5)
section.right_margin = Cm(2.5)
# ── Default font ─────────────────────────────────────────────
style = doc.styles["Normal"]
style.font.name = "Arial"
style.font.size = Pt(10.5)
# ════════════════════════════════════════════════════════════
# HEADER BANNER TABLE
# ════════════════════════════════════════════════════════════
tbl = doc.add_table(rows=1, cols=1)
tbl.alignment = WD_TABLE_ALIGNMENT.CENTER
tbl.style = "Table Grid"
cell = tbl.cell(0, 0)
set_cell_bg(cell, NAVY)
cell.width = Inches(6.3)
# Remove all borders
tc = cell._tc
tcPr = tc.get_or_add_tcPr()
tcBorders = OxmlElement('w:tcBorders')
for side in ['top', 'left', 'bottom', 'right']:
border = OxmlElement(f'w:{side}')
border.set(qn('w:val'), 'none')
tcBorders.append(border)
tcPr.append(tcBorders)
p = cell.paragraphs[0]
p.alignment = WD_ALIGN_PARAGRAPH.CENTER
p.paragraph_format.space_before = Pt(14)
add_run(p, "DIGITAL HEALTH IN PUBERTY", bold=True, color=WHITE, size=18)
p2 = cell.add_paragraph()
p2.alignment = WD_ALIGN_PARAGRAPH.CENTER
add_run(p2, "Digital Addiction • Sleep Disturbance • Physical Activity", bold=False,
color=RGBColor(0x9E, 0xC8, 0xD4), size=11, italic=True)
p3 = cell.add_paragraph()
p3.alignment = WD_ALIGN_PARAGRAPH.CENTER
p3.paragraph_format.space_after = Pt(12)
add_run(p3, "A Summary for School Administrators and Parents | July 2026",
color=RGBColor(0x7A, 0x90, 0xA4), size=9.5)
doc.add_paragraph() # spacer
# ════════════════════════════════════════════════════════════
# PURPOSE
# ════════════════════════════════════════════════════════════
p_intro = doc.add_paragraph()
p_intro.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
p_intro.paragraph_format.space_after = Pt(10)
add_shading(p_intro, "EBF5F8")
p_intro.paragraph_format.left_indent = Inches(0.15)
p_intro.paragraph_format.right_indent = Inches(0.15)
add_run(p_intro,
"This document summarises current evidence on how digital device overuse, "
"sleep disruption, and physical inactivity interact during puberty to affect "
"adolescent health and development. It is intended as a practical reference for "
"school staff and parents to understand the problem and take action.",
size=10.5, color=NAVY, italic=True)
# ════════════════════════════════════════════════════════════
# SECTION 1 – WHY PUBERTY MATTERS
# ════════════════════════════════════════════════════════════
section_heading(doc, "1. WHY PUBERTY IS A CRITICAL WINDOW")
body_para(doc,
"Puberty (approximately ages 8–16) is one of the most hormonally and neurologically "
"active periods of human development. During this time:")
bullet_item(doc, "Brain plasticity is high:",
"the prefrontal cortex (decision-making, impulse control) is still maturing, "
"making adolescents more susceptible to habit formation and addictive behaviours.")
bullet_item(doc, "Reward sensitivity is heightened:",
"the dopaminergic system is uniquely responsive, amplifying the appeal of "
"digital rewards (likes, notifications, game scores).")
bullet_item(doc, "Sleep architecture shifts:",
"circadian rhythms naturally delay 1–3 hours, making teens biologically prone "
"to later sleep — a vulnerability worsened by screen use.")
bullet_item(doc, "Hormones depend on sleep:",
"growth hormone (GH) and sex hormones are primarily secreted during slow-wave "
"sleep; chronic sleep loss can impair normal pubertal development.")
body_para(doc,
"Habits and health patterns established during puberty strongly predict adult "
"outcomes. Disruption during this window carries long-term consequences.",
space_after=8)
# ════════════════════════════════════════════════════════════
# SECTION 2 – THE THREE INTERCONNECTED PROBLEMS
# ════════════════════════════════════════════════════════════
section_heading(doc, "2. THE THREE INTERCONNECTED PROBLEMS")
body_para(doc,
"Digital addiction, poor sleep, and physical inactivity do not exist in isolation — "
"each one worsens the other two, creating a self-reinforcing cycle.")
# 2a Digital Addiction
p = doc.add_paragraph()
p.paragraph_format.space_before = Pt(8)
p.paragraph_format.space_after = Pt(3)
add_run(p, "A. Digital Addiction / Problematic Screen Use", bold=True, color=ORANGE, size=11)
bullet_item(doc, "Scale:", "20–30% of adolescents globally show signs of problematic internet or smartphone use.")
bullet_item(doc, "Average use:", "Adolescents spend an average of 4.6 hours per day on recreational screens — "
"more than double WHO recommendations.")
bullet_item(doc, "Mechanism:", "Variable-ratio reward (unpredictable 'likes', streaks, notifications) activates "
"the same dopamine pathways as gambling, building compulsive use patterns.")
bullet_item(doc, "Mental health link:", "High screen time is associated with 3× higher risk of depression and "
"anxiety compared to low screen-time peers.")
bullet_item(doc, "Common forms:", "Social media (TikTok, Instagram), online gaming, binge-streaming, "
"compulsive messaging.")
# 2b Sleep
p = doc.add_paragraph()
p.paragraph_format.space_before = Pt(8)
p.paragraph_format.space_after = Pt(3)
add_run(p, "B. Sleep Disturbance", bold=True, color=TEAL, size=11)
bullet_item(doc, "Screen-light effect:", "Blue light from device screens suppresses melatonin by up to 85%, "
"delaying sleep onset — on top of the natural pubertal phase delay.")
bullet_item(doc, "Sleep displacement:", "Each additional hour of screen time reduces sleep by approximately "
"8 minutes; most adolescents accumulate a 1–2 hour nightly deficit.")
bullet_item(doc, "Night-time alerts:", "Notifications during the night fragment sleep architecture, "
"reducing deep (slow-wave) and REM sleep — both essential for memory and hormone secretion.")
bullet_item(doc, "Consequences:", "Poor sleep during puberty elevates cortisol, impairs growth hormone pulses, "
"raises insulin resistance, and contributes to obesity, mood disorders, and poor academic performance.")
bullet_item(doc, "Need:", "Adolescents require 8–10 hours of sleep per night (AASM guideline); "
"most get 6–7 hours.")
# 2c Physical Activity
p = doc.add_paragraph()
p.paragraph_format.space_before = Pt(8)
p.paragraph_format.space_after = Pt(3)
add_run(p, "C. Physical Inactivity", bold=True, color=GREEN, size=11)
bullet_item(doc, "Global deficit:", "Only ~20% of adolescents meet the WHO recommendation of "
"60+ minutes of moderate-to-vigorous physical activity per day.")
bullet_item(doc, "Displacement:", "Each additional hour of screen time is associated with 13–25 minutes "
"less physical activity per day.")
bullet_item(doc, "Cardiometabolic risk:", "High screen time combined with low physical activity is linked "
"to 3× higher cardiometabolic risk (J Am Heart Assoc, 2025).")
bullet_item(doc, "Pubertal timing:", "Overweight, high screen time, and low activity together are associated "
"with significantly earlier pubertal onset in girls (Li et al., 2024).")
bullet_item(doc, "Brain effects:", "Exercise stimulates BDNF (brain-derived neurotrophic factor), which supports "
"memory, impulse control, and mental health — all impaired by a sedentary lifestyle.")
# ════════════════════════════════════════════════════════════
# SECTION 3 – KEY STATISTICS AT A GLANCE (table)
# ════════════════════════════════════════════════════════════
section_heading(doc, "3. KEY STATISTICS AT A GLANCE")
headers = ["Indicator", "Finding", "Source"]
rows = [
["Average teen screen time", "4.6 hours/day recreational", "WHO / Global surveys"],
["Problematic internet use", "20–30% of adolescents", "Meta-analytic estimates"],
["Meet PA guidelines", "Only ~20% globally", "WHO 2020"],
["Average teen sleep", "6–7 h/night (need: 8–10 h)", "AASM Guideline"],
["Melatonin suppression by screens", "Up to 85% reduction", "Chang et al., 2015, PNAS"],
["Depression risk – high ST vs low ST", "3× higher risk", "Multiple cohort studies"],
["Cardiometabolic risk – high ST + low PA", "3× higher risk", "Horner et al., 2025 JAHA"],
["Early puberty risk – overweight + high ST + low PA", "Significantly elevated", "Li et al., 2024, Sci Rep"],
]
tbl2 = doc.add_table(rows=len(rows)+1, cols=3)
tbl2.style = "Table Grid"
tbl2.alignment = WD_TABLE_ALIGNMENT.CENTER
# Set column widths
widths = [Inches(2.1), Inches(2.5), Inches(1.7)]
for i, col in enumerate(tbl2.columns):
for cell in col.cells:
cell.width = widths[i]
# Header row
for j, h in enumerate(headers):
cell = tbl2.cell(0, j)
set_cell_bg(cell, NAVY)
p = cell.paragraphs[0]
p.alignment = WD_ALIGN_PARAGRAPH.CENTER
add_run(p, h, bold=True, color=WHITE, size=10)
# Data rows
for i, row_data in enumerate(rows):
bg = LGRAY if i % 2 == 0 else WHITE
for j, text in enumerate(row_data):
cell = tbl2.cell(i+1, j)
set_cell_bg(cell, bg)
p = cell.paragraphs[0]
p.alignment = WD_ALIGN_PARAGRAPH.LEFT if j < 2 else WD_ALIGN_PARAGRAPH.LEFT
clr = TEAL if j == 1 else DGRAY
bold = True if j == 1 else False
add_run(p, text, size=10, color=clr, bold=bold)
doc.add_paragraph()
# ════════════════════════════════════════════════════════════
# SECTION 4 – WARNING SIGNS
# ════════════════════════════════════════════════════════════
section_heading(doc, "4. WARNING SIGNS TO WATCH FOR")
body_para(doc, "Parents and teachers should be alert to the following signs in adolescents:")
signs = [
("Difficulty limiting screen use:", "distress or irritability when devices are taken away"),
("Sleep problems:", "difficulty falling asleep, staying asleep, or waking, with daytime fatigue"),
("Declining physical activity:", "dropping out of sport, avoiding outdoor activity, preferring sedentary time"),
("Academic decline:", "reduced concentration, memory problems, falling grades"),
("Social withdrawal:", "preferring online over in-person interaction; withdrawal from family"),
("Mood changes:", "increased anxiety, depression, irritability, or emotional dysregulation"),
("Physical complaints:", "frequent headaches, eye strain, back/neck pain from prolonged device use"),
("Neglecting basic needs:", "skipping meals, hygiene, homework, or sleep to continue screen use"),
]
for label, text in signs:
bullet_item(doc, label, text, bullet_color=ORANGE)
# ════════════════════════════════════════════════════════════
# SECTION 5 – WHAT SCHOOLS CAN DO
# ════════════════════════════════════════════════════════════
section_heading(doc, "5. WHAT SCHOOLS CAN DO")
school_actions = [
("Daily physical activity:", "Ensure at least 30 minutes of structured physical activity during the school day."),
("Limit recreational screen time at school:", "Restrict personal device use during breaks and lunchtimes."),
("Digital literacy curriculum:", "Teach students about the neuroscience of digital addiction, "
"the effect of blue light on sleep, and strategies for healthy use."),
("Screen-based homework limits:", "Set time-bounded expectations for homework requiring devices; "
"avoid assigning work that requires screens close to bedtime."),
("Sleep education:", "Include sleep hygiene in health curriculum — particularly for Years 7–10 (ages 11–16)."),
("Screening and referral:", "Train pastoral staff to identify signs of problematic digital use and "
"refer to school counsellors or health services."),
("Whole-school phone policies:", "Consider phone-free policies during lessons or throughout the school day — "
"evidence shows improvements in concentration and wellbeing."),
("Parent communication:", "Share evidence-based resources with parents termly; host information evenings."),
]
for label, text in school_actions:
bullet_item(doc, label, text, bullet_color=TEAL)
# ════════════════════════════════════════════════════════════
# SECTION 6 – WHAT PARENTS CAN DO
# ════════════════════════════════════════════════════════════
section_heading(doc, "6. WHAT PARENTS CAN DO")
parent_actions = [
("Set a screen-time contract:", "Co-create clear, consistent rules around when, where, and how long "
"devices can be used. Write them down and revisit them regularly."),
("Phone-free bedroom rule:", "All devices charged outside the bedroom at night — ideally from age 10+."),
("No screens 60 minutes before bed:", "Replace this time with reading, stretching, or conversation."),
("Model the behaviour:", "Adolescents are more likely to follow rules when adults follow them too."),
("Encourage 60 min/day of outdoor activity:", "Walking, cycling, swimming, team sport — any movement counts."),
("Know what your child is using:", "Regularly discuss apps, games, and social platforms without judgment."),
("Use built-in parental controls:", "Screen Time (iOS), Digital Wellbeing (Android), and router-level "
"controls can enforce limits automatically."),
("Watch for warning signs:", "Act early — the longer problematic use continues, the harder it is to change."),
("Seek help if needed:", "GPs, school counsellors, and adolescent mental health services can provide "
"CBT-based support for problematic digital use."),
]
for label, text in parent_actions:
bullet_item(doc, label, text, bullet_color=GREEN)
# ════════════════════════════════════════════════════════════
# SECTION 7 – THE EVIDENCE BASE
# ════════════════════════════════════════════════════════════
section_heading(doc, "7. THE EVIDENCE BASE")
body_para(doc, "This summary is based on peer-reviewed research published between 2015 and 2026:")
refs = [
"Lehnhard AR et al. Longitudinal relationship between screen time, cardiorespiratory fitness, "
"and waist circumference in children and adolescents: a 3-year cohort study. "
"BMC Pediatr. 2023;23(1):558. PMID 37925397",
"Li W et al. Joint association of overweight/obesity, high electronic screen time, and low "
"physical activity with early pubertal development in girls. "
"Sci Rep. 2024;14:10508. PMID 38719835",
"Yaakoubi M et al. Screen Time, Fatigue, Obesity and Physical Inactivity: Health Correlates "
"of Problematic Smartphone Use in Adolescents. Child Care Health Dev. 2026. PMID 41555649",
"Horner D et al. Screen Time Is Associated With Cardiometabolic and Cardiovascular Disease "
"Risk in Childhood and Adolescence. J Am Heart Assoc. 2025. PMID 40767283",
"Meneo D et al. A Closer Look at Paediatric Sleep: Sleep Health and Sleep Behavioural "
"Disorders in Children and Adolescents. J Sleep Res. 2025. PMID 40292521",
"Chang AM et al. Evening use of light-emitting eReaders negatively affects sleep, circadian "
"timing, and next-morning alertness. PNAS. 2015;112(4):1232–1237.",
"WHO. Global Action Plan on Physical Activity 2018–2030. Geneva: WHO; 2020.",
"American Academy of Sleep Medicine. Recommended Amount of Sleep for Pediatric Populations. "
"J Clin Sleep Med. 2016;12(6):785–786.",
]
for i, ref in enumerate(refs):
p = doc.add_paragraph()
p.paragraph_format.left_indent = Inches(0.25)
p.paragraph_format.first_line_indent = Inches(-0.2)
p.paragraph_format.space_after = Pt(4)
add_run(p, f"{i+1}. ", bold=True, color=TEAL, size=10)
add_run(p, ref, size=9.5, color=DGRAY)
# ════════════════════════════════════════════════════════════
# FOOTER NOTE
# ════════════════════════════════════════════════════════════
doc.add_paragraph()
p_footer = doc.add_paragraph()
p_footer.alignment = WD_ALIGN_PARAGRAPH.CENTER
p_footer.paragraph_format.space_before = Pt(10)
add_shading(p_footer, hex_str(NAVY))
p_footer.paragraph_format.left_indent = Inches(0.1)
p_footer.paragraph_format.right_indent = Inches(0.1)
add_run(p_footer,
"This document is intended for educational purposes. For clinical concerns about a child's "
"digital use, sleep, or physical health, please consult a qualified healthcare professional.",
size=9, color=RGBColor(0xCC, 0xDD, 0xE8), italic=True)
# ════════════════════════════════════════════════════════════
# SAVE
# ════════════════════════════════════════════════════════════
out = "/tmp/workspace/digital-addiction-ppt/Digital_Health_Puberty_Summary.docx"
doc.save(out)
print(f"Saved: {out}")
python /tmp/workspace/digital-addiction-ppt/build_summary_doc.py 2>&1
Digital Health Puberty Summary
Word Document · DOCX
| Section | Contents |
|---|---|
| 1. Why Puberty Matters | Plain-English explanation of why this developmental window is so sensitive |
| 2. The Three Interconnected Problems | Separate breakdowns of digital addiction, sleep disturbance, and physical inactivity with key facts |
| 3. Key Statistics at a Glance | Formatted table of 8 headline statistics with sources |
| 4. Warning Signs | 8 specific signs parents/teachers should watch for |
| 5. What Schools Can Do | 8 concrete, actionable steps for administrators |
| 6. What Parents Can Do | 9 practical home strategies |
| 7. Evidence Base | 8 peer-reviewed citations for credibility |